i'm programming the next formula in vba
ActiveSheet.Cells(ActiveCell.Row, 1).Select
ActiveCell.Offset(0, 7).Select
With ActiveCell
.formula = "=SUM(" & .Offset(1, 0).Address(0, 0) & ":" & _
.End(xlDown).Offset(0, 0).Address(0, 0) & ")"
End With
and its causing me some problems, because if i run the macro once it just takes 1 row in the formula: =SUM(H11:H11), but if i run it twice it works perfectly, taking in the sum all the values until the first blank cell in the worksheet.
Can you help me to improve my macro so it works properly from the first run?
Thank you for your attention and in advance
best regards, Sergio