VB to AutoSum

G

Guest

In the following, the last action is to sum Row 2:Row 1889. Row 1889 varies
each time I run the report. I am looking for some way to either AutoSum in
the active cell or count the number of rows above the active cell (minus the
header row) and insert that number in the place of 1889. Help Please. ~Robert

Columns("L:L").Select
Selection.Find(What:="", After:=ActiveCell, LookIn:=xlFormulas, LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext,
MatchCase:= _
False, SearchFormat:=False).Activate
ActiveCell.Offset(0, 23).Range("A1").Select
ActiveCell.FormulaR1C1 = "=SUM(R[-1889]C:R[-1]C)"
 

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