使用vba进行遍历汇总吧啊
Sub 按钮1_Click()
Application.ScreenUpdating = False
Set sht = Sheets("汇总表")
sht.UsedRange.Offset(2).ClearContents
str1 = ""
For Each sh In Sheets
If sh.Name <> sht.Name Then
str1 = str1 & sh.Name
sh.UsedRange.Offset(2).Copy sht.Cells(Rows.Count, 1).End(3).Offset(1)
End If
Next sh
sht.[a1] = str1 & "班级学生信息"
Application.ScreenUpdating = True
End Sub
用vba,逐个表判断是否为空,不为空就复制内容到第四个表,第四个表光标下移,循环