Subtotal data of various lengths without entering Sum(...) manuall

  • Thread starter Thread starter Jeff-B
  • Start date Start date
J

Jeff-B

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.
 
FirstRow = 3
LastRow = Range("A" & Rows.count).end(xlup).Row

Range("A" & (LastRow + 2).formula = "=Sum(A" & FirstRow & ":A" & LastRow & ")"
 
I'd be surprised if there isn't a worksheet formula solution to your
question. Can you describe to us how your data is laid out?

Rick
 
Thanks for the reply, the data is laid out like this:

Day Sale Commision

01/01/08 1234 100
01/01/08 4321 100
.. . .
.. . .
5555 200 (Last row of the day
is the totals)
01/02/08 1234 100
01/02/08 ect
 
Back
Top