View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
joel joel is offline
external usenet poster
 
Posts: 9,101
Default Subtotal data of various lengths without entering Sum(...) manuall



FirstRow = 3
LastRow = Range("A" & Rows.count).end(xlup).Row

Range("A" & (LastRow + 2).formula = "=Sum(A" & FirstRow & ":A" & LastRow & ")"

"Jeff-B" wrote:

I have a large sheet that is broken down by date of sale. I need to subtotal
each days sales. Is there a way to write a vba so that I don't have to
manually type sum(a*.A*) for each and everyday. There number of sales each
day is not constant therefor one cannot just use a constant range length.