Hi Guys,
I'm trying to make my active cell input the sum function but I keep getting different errors, I started up by recording a macro which set my range according to my selection:
Selection.FormulaR1C1 = "=SUM(R[-58]C:R[-1]C)"
But I need it to sum a dynamic range which will change every time I run the macro so I created a simple loop to determine the offset amount and put it into an integer "RowCounter" then put in that integer into the same sum function:
Selection.FormulaR1C1 = "=SUM(R[RowCounter]C:R[-1]C)"
"RowCounter" is -58 in this case, but it doesn't work, could you please suggest a way to make this work please.
Thank you!!
I'm trying to make my active cell input the sum function but I keep getting different errors, I started up by recording a macro which set my range according to my selection:
Selection.FormulaR1C1 = "=SUM(R[-58]C:R[-1]C)"
But I need it to sum a dynamic range which will change every time I run the macro so I created a simple loop to determine the offset amount and put it into an integer "RowCounter" then put in that integer into the same sum function:
Selection.FormulaR1C1 = "=SUM(R[RowCounter]C:R[-1]C)"
"RowCounter" is -58 in this case, but it doesn't work, could you please suggest a way to make this work please.
Thank you!!