用宏将分表合并到总表,在选中总表的情况下运行宏:
Sub 合并当前工作簿下的所有工作表()
Dim j As Integer
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).PasteSpecial Format:=xlPasteValues
End If
Next
Range("A1").Select
Application.ScreenUpdating = True
MsgBox "当前工作簿下的全部工作表已经合并完毕!", vbInformation, "提示"
End Sub