Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Subtotal data of various lengths without entering Sum(...) manuall

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.
  #2   Report Post  
Posted to microsoft.public.excel.programming
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.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Subtotal data of various lengths without entering Sum(...) manuall

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


"Jeff-B" wrote in message
...
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.


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Subtotal data of various lengths without entering Sum(...) man

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


"Rick Rothstein (MVP - VB)" wrote:

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


"Jeff-B" wrote in message
...
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.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Lengths of LISTS RLD Excel Discussion (Misc queries) 3 March 17th 10 07:29 AM
Sorting rows of data of varying lengths NDBC Excel Discussion (Misc queries) 12 July 4th 09 12:44 PM
Economical grouping of lengths out of much longer lengths Richard (a Builder not a Mathematician) Excel Worksheet Functions 1 January 19th 08 10:28 PM
Chart lengths Danny Charts and Charting in Excel 0 June 5th 06 10:39 PM
Parse data with uneven lengths and different delimiters [email protected] Excel Worksheet Functions 3 January 5th 06 11:57 PM


All times are GMT +1. The time now is 04:25 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"