Relative Range in a Formula

G

Guest

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!!
 
G

Guest

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top