Sum Formula

G

Guest

How can I enter a formula with a macro that will sum all the rows above it in
that column? I need the formula to be entered into the cell 2 rows below the
last row with data in that column.
 
H

Harald Staff

Sub SumFormula()
Cells(65000, ActiveCell.Column).End(xlUp). _
Offset(2, 0).FormulaR1C1 = "=SUM(R1C:R[-2]C)"
End Sub

HTH. Best wishes Harald
 

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