'定義一個宏就行了
Sub mysum()
Dim i As Integer, r As Integer, c As Integer
Dim size As Variant
size = Array(4, 3, 3)
With ActiveSheet
r = .UsedRange.Row
c = .UsedRange.Column
For i = LBound(size) To UBound(size)
.Cells(r, c + 2).Resize(size(i)).Value = WorksheetFunction.sum(.Cells(r, c).Resize(size(i)))
r = r + size(i)
Next i
End With
End Sub
'定義一個宏就行了
Sub mysum()
Dim i As Integer, r As Integer, c As Integer
Dim size As Variant
size = Array(4, 3, 3)
With ActiveSheet
r = .UsedRange.Row
c = .UsedRange.Column
For i = LBound(size) To UBound(size)
.Cells(r, c + 2).Resize(size(i)).Value = WorksheetFunction.sum(.Cells(r, c).Resize(size(i)))
r = r + size(i)
Next i
End With
End Sub