activeCell.FormulaR1C1 = "=SUM(" & activeCell.Offset(0, -2).Address & "+" & activeCell.Offset(0, -4).Address & "+" & activeCell.Offset(0, -6).Address & "+" & activeCell.Offset(0, -8).Address & "+" & activeCell.Offset(0, -10).Address & ")"
答案1
而不是
activeCell.Offset(0, -2).Address
用这个,
activeCell.Offset(0, -2).Address(RowAbsolute:= False, ColumnAbsolute:= False)