|
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件 ★ 免费下载 ★ ★ 使用帮助★
Sub 汇总()
Dim sh As Worksheet
Dim ar As Variant
Dim arr()
ReDim arr(1 To Sheets.Count - 1, 1 To 35)
For Each sh In Sheets
If sh.Name <> "汇总表" Then
ar = sh.Range("a1:l64")
n = n + 1
arr(n, 1) = n
arr(n, 2) = ar(3, 2)
arr(n, 3) = ar(5, 2)
arr(n, 4) = ar(7, 2)
arr(n, 5) = ar(9, 2)
arr(n, 6) = ar(7, 5)
arr(n, 7) = ar(9, 5)
arr(n, 8) = ar(9, 9)
'''以下自己一样画葫芦吧
End If
Next sh
With Sheets("汇总表")
.UsedRange.Offset(3) = Empty
.[a4].Resize(n, UBound(arr, 2)) = arr
End With
MsgBox "ok!"
End Sub |
|