|
本帖最后由 ykcbf1100 于 2024-12-9 16:43 编辑
参与一下。。。
- Sub ykcbf() '//2024.12.9
- Application.ScreenUpdating = False
- Set d = CreateObject("Scripting.Dictionary")
- With ActiveSheet
- r = .Cells(Rows.Count, 1).End(3).Row
- arr = .[a1].Resize(r, 7)
- For i = 6 To UBound(arr)
- If arr(i, 1) Like "[一-龥]" Then k = k + 1: d(k) = i
- Next
- For k = 1 To d.Count
- r1 = d(k)
- If k = d.Count Then r2 = r Else r2 = d(k + 1) - 1
- rr = r2 - r1
- For j = 6 To 7
- .Cells(r1, j) = Application.Sum(.Cells(r1 + 1, j).Resize(rr))
- Next
- Next
- End With
- Set d = Nothing
- Application.ScreenUpdating = True
- MsgBox "OK!"
- End Sub
复制代码
|
评分
-
2
查看全部评分
-
|