Home > Topics > Excel > body text

How to batch merge work pages in excel?

coldplay.xixi
Release: 2020-07-07 11:31:02
Original
8562 people have browsed it

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?

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:

How to batch merge work pages in excel?

#2. "Right-click" on the newly created sheet, find "View Code", and then see the macro calculation interface. As shown in the picture:

How to batch merge work pages in excel?

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
Copy after login

How to batch merge work pages in excel?

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:

How to batch merge work pages in excel?

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.

How to batch merge work pages in excel?

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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact [email protected]
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!