|
[广告] VBA代码宝 - VBA编程加强工具 · VBA代码随查随用 · 内置多项VBA编程加强工具 ★ 免费下载 ★ ★ 使用手册★
参与一下。。。
- Sub ykcbf() '//2024.4.30
- Set d = CreateObject("Scripting.Dictionary")
- ReDim brr(1 To 10000, 1 To 2)
- For Each sht In Sheets
- arr = sht.UsedRange
- For i = 2 To UBound(arr)
- If arr(i, 1) <> Empty Then st = arr(i, 1)
- d(st) = d(st) + arr(i, 2)
- Next
- Next
- With Sheets("Sheet1")
- .[g2:h10000] = ""
- .[g2].Resize(d.Count, 2) = WorksheetFunction.Transpose(Array(d.keys, d.Items))
- .[g2].Resize(d.Count, 2).Borders.LineStyle = 1
- End With
- End Sub
复制代码
|
评分
-
1
查看全部评分
-
|