Relative Range in a Formula

A

Alex

I have a relative range that I need to capture in a SUM formula, recording
the macro gives me this. Is there a way to capture the true range?


This is what's in my SUB...
ActiveCell.FormulaR1C1 = "=SUM(R[-66]C:R[-1]C)"

Thanks!!
 
A

Alex

Never mind found it...

SUMMING A RANGE

With ActiveCell
Set ColRange = Range(.Offset(-1), .Offset(-1).End(xlUp))
.Formula = "=sum( " & ColRange.Address(RowAbsolute:=False) & ")"
End With
 
Top