|
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件 ★ 免费下载 ★ ★ 使用帮助★
Sub 汇总()
Dim ar As Variant
Dim br()
ReDim br(1 To 100000, 1 To 11)
For Each sh In Sheets
If sh.Index > 1 Then
ar = sh.[a1].CurrentRegion
For i = 2 To UBound(ar)
If Trim(ar(i, 6)) = "否" Then
n = n + 1
For j = 1 To UBound(ar, 2)
br(n, j) = ar(i, j)
Next j
End If
Next i
End If
Next sh
If n = "" Then MsgBox "没有需要汇总的数据!": End
With Sheets("待办")
.[a1].CurrentRegion.Offset(1) = Empty
.[a2].Resize(n, UBound(br, 2)) = br
End With
MsgBox "ok!"
End Sub
|
|