View Single Post
  #3   Report Post  
Dave Peterson
 
Posts: n/a
Default

You could find the next available row (I used column A):

dim NextRow as long
with activesheet
nextrow = .cells(.rows.count,"A").end(xlup).row + 1

.cells(nextrow,"B").resize(1,5).formulaR1C1 _
= "=sum(r1c:r[-1]c)"
end with

Another option would be to insert a new row 1 and use that to hold your
formulas.

Then you wouldn't have to care where the data stops.

You could use a formula like:
=sum(B2:B65536)



Scott wrote:

I have some csv data the I pull into Excel to format and etc. The data rows
are always different (from month to month). One time I will have 400 rows,
the next time I might have 58. Is there a way to force Excel to Autosum
defined columns on each page without having to Insert a row at the bottom of
each page?


--

Dave Peterson