Good Morning
As part of a macro I am using I want to add a formula in M12 to sum all the values in every 3rd cell along row 12 from starting point O12 to last column. the last column will vary.
The formula that works is but this always has same range.
I have DIM LastColumn but don't know how to fit it into the above formula.
Any help would be very much appreciated.
Thanks
Coop123
As part of a macro I am using I want to add a formula in M12 to sum all the values in every 3rd cell along row 12 from starting point O12 to last column. the last column will vary.
The formula that works is but this always has same range.
ActiveCell.Formula2R1C1 = _
"=SUMPRODUCT((MOD(COLUMN(RC[2]:RC[37])-COLUMN(RC[2]),3)=0)*1,RC[2]:RC[37])"
I have DIM LastColumn but don't know how to fit it into the above formula.
I also need to copy the formula down to last row in column M.Dim LastColumn As Long
LastColumn = Cells(10, Columns.Count).End(xlToLeft).Column
Any help would be very much appreciated.
Thanks
Coop123