next
02-20-2008, 10:43 AM
i = column number.
LastCell = Row on which calculation should be performed.
I'm trying to insert a sum formula in each row from 3 to 12.
Sum should calculate all values above it up to second row.
For instance first loop:
Cells(column 3, Row 65).Value.FormulaR1C1 = "=SUM(everything in third column from row 2 to row 64)".
Please help:
For i = 3 To 12
Cells(i, LastCell).Value.FormulaR1C1 = "=SUM(?)"
Next i
Thanks!
LastCell = Row on which calculation should be performed.
I'm trying to insert a sum formula in each row from 3 to 12.
Sum should calculate all values above it up to second row.
For instance first loop:
Cells(column 3, Row 65).Value.FormulaR1C1 = "=SUM(everything in third column from row 2 to row 64)".
Please help:
For i = 3 To 12
Cells(i, LastCell).Value.FormulaR1C1 = "=SUM(?)"
Next i
Thanks!