excel多个工作表数据汇总?

发布网友 发布时间:2022-04-24 02:14

我来回答

1个回答

热心网友 时间:2023-10-21 07:52

新建一个汇总表

Sub 复制到汇总()
Dim Brr(1 To 20, 1 To 1)
Dim l As Integer
Dim j As Integer
For l = 1 To Sheets.Count
Brr(l, 1) = Sheets(l).Name
Next
For j = 2 To Sheets.Count
Sheets(Brr(j, 1)).Select
EndH = Range("e65536").End(xlUp).Row
For i = EndH To 1 Step -1
XX = Range("A" & i).Value
If XX <> "" Then
m = m + 1
Range("A" & i).EntireRow.Copy Sheets("汇总").Range("a" & m)
End If
Next
Next
End Sub

热心网友 时间:2023-10-21 07:52

新建一个汇总表

Sub 复制到汇总()
Dim Brr(1 To 20, 1 To 1)
Dim l As Integer
Dim j As Integer
For l = 1 To Sheets.Count
Brr(l, 1) = Sheets(l).Name
Next
For j = 2 To Sheets.Count
Sheets(Brr(j, 1)).Select
EndH = Range("e65536").End(xlUp).Row
For i = EndH To 1 Step -1
XX = Range("A" & i).Value
If XX <> "" Then
m = m + 1
Range("A" & i).EntireRow.Copy Sheets("汇总").Range("a" & m)
End If
Next
Next
End Sub

热心网友 时间:2023-10-21 07:52

新建一个汇总表

Sub 复制到汇总()
Dim Brr(1 To 20, 1 To 1)
Dim l As Integer
Dim j As Integer
For l = 1 To Sheets.Count
Brr(l, 1) = Sheets(l).Name
Next
For j = 2 To Sheets.Count
Sheets(Brr(j, 1)).Select
EndH = Range("e65536").End(xlUp).Row
For i = EndH To 1 Step -1
XX = Range("A" & i).Value
If XX <> "" Then
m = m + 1
Range("A" & i).EntireRow.Copy Sheets("汇总").Range("a" & m)
End If
Next
Next
End Sub

声明声明:本网页内容为用户发布,旨在传播知识,不代表本网认同其观点,若有侵权等问题请及时与本网联系,我们将在第一时间删除处理。E-MAIL:11247931@qq.com