First, you are trying to use the Range.End property without telling .End
what it is the end of.
With ActiveCell
.FormulaR1C1 = "=SUM(R[" & .Parent.Cells(Rows.Count, .Column).End(xlUp).Row & "]C:R[-2]C)"
End With
Secondly, that formula is almost always going to be a circular reference since you want to total from two rows above the active cell (in the same column) to the last populated row in the same column. That sounds like it will include the cell itself which is a circular reference.
To sum from the second row (in the active cell's column) to two rows above the active cell then this would be appropriate.
With ActiveCell
if .row > 3 then
.FormulaR1C1 = "=SUM(R2C:R" & .row - 2 & "C)"
end if
End With
If you needed this to start at the first row then the formula would begin with "=SUM(R1C:R" & ...
.