Can anyone solve this?
Sub test Dim i as integer For I = 1 to 10 ActiveCell.Offset(0, 2).Formula = "=Sum(E15,&i&)" Next I End Sub
You're close, trying to use ampersands (&) to concatenate strings.
&
ActiveCell.Offset(0, 2).Formula = "=Sum(E15," & i & ")"
Use the ampersands between strings to merge them, not inside strings.
1.4m articles
1.4m replys
5 comments
57.0k users