我对Macros并不擅长,但我正在尝试使用SUMIF公式作为变量,但我收到了错误。我需要这样做19次,所以如果我能得到第一个hekp我会很好
Sub Ejemplo1()
Dim Value1, Value2, Value3, Value4, Value5, Value6, Value7, Value8, Value9, Value10, Value11, Value12, Value13, Value14, Value15, Value16, Value17, Value18, Value19, Fila1, Columna1 As Integer
Value20 = ActiveCell
Fila1 = ActiveCell.Row
Columna1 = ActiveCell.Column
Fila1 = Fila1 - 21
Value1 = Value1.Formula = "=SUMIFS(INDEX(Table1,,MATCH($A$1,Table1[#Headers],0)),Table1['#],ActiveCell)"
MsgBox (Value1)
End Sub