How to batch merge work pages in excel: First create a new worksheet on the front page; then [right-click] in the newly created sheet and find [View Code]; finally copy the code and click Just click [Run Subprocess/UserForm] under [Run].
How to batch merge work pages in excel:
1. See so many data pages that you want to merge , if you copy and paste, the workload will be huge. Let's start merging now. First, we need to create a new worksheet on the front page. As shown in the picture:
#2. "Right-click" on the newly created sheet, find "View Code", and then see the macro calculation interface. As shown in the picture:
3. When we see the macro calculation interface, we only need to copy the following code. The code is as follows and the effect is as follows:
Sub 合并当前工作簿下的所有工作表() Application.ScreenUpdating = False For j = 1 To Sheets.Count If Sheets(j).Name <> ActiveSheet.Name Then X = Range("A65536").End(xlUp).Row + 1 Sheets(j).UsedRange.Copy Cells(X, 1) End If Next Range("B1").Select Application.ScreenUpdating = True MsgBox "当前工作簿下的全部工作表已经合并完毕!", vbInformation, "提示" End Sub
4. After completing the above things, you only need to click "Run Subprocess/User Form" under "Run" on the toolbar. After the merger is completed, there will be hint. After the prompt is completed, you can close the macro calculation interface. As shown in the picture:
5. The effect after the merger is as shown below. What we see is that there are more than 8,000 rows after the merger, which is the result of the merger of 205 pages. Thanks. If you have any questions, please leave a message.
Related learning recommendations:excel basic tutorial
The above is the detailed content of How to batch merge work pages in excel?. For more information, please follow other related articles on the PHP Chinese website!