首頁>Club>
2
回覆列表
  • 1 # 使用者3456175603979

    '定義一個宏就行了

    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

  • 中秋節和大豐收的關聯?
  • 江州司馬青衫溼江州司馬是誰?