Excel合并多个sheet为一个sheet

时间:2021-3-7     作者:Gao Yushan     分类:



Sub 合并()
Application.ScreenUpdating = False
For j = 1 To Sheets.Count
    If Sheets(j).Name <> ActiveSheet.Name And Sheets(j).Name Like "*分部分项*" Then
        X = Range("A60000").End(xlUp).Row + 1
        Sheets(j).UsedRange.Copy Cells(X, 1)
    End If
Next
Range("B1").Select
Application.ScreenUpdating = True
MsgBox "Dady, the data have been combined together!", vbInformation, "Tip:"
End Sub