JZB
06-11-2009, 08:21 AM
Hi guys
I am putting a sum formulae at the bottom of a column. However the data varies in length. the start point is always row 2, but the lastrow variable needs to be incorporated into the formula
I got this so far
nlastrow = Range("C65536").End(xlUp).Row
Range("C" & nlastrow + 2).FormulaR1C1 = "=SUM(C2:"C"&nlastrow)"
but i keep getting an error. :banghead:
can anyone help
Thanks
Jon
I am putting a sum formulae at the bottom of a column. However the data varies in length. the start point is always row 2, but the lastrow variable needs to be incorporated into the formula
I got this so far
nlastrow = Range("C65536").End(xlUp).Row
Range("C" & nlastrow + 2).FormulaR1C1 = "=SUM(C2:"C"&nlastrow)"
but i keep getting an error. :banghead:
can anyone help
Thanks
Jon