Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35
Default Column Subtotals with variable number of items

Ok, I must concede defeat and ask the VBA gurus out there for help.

I have a spreadsheet that I need to subtotal column C and Column D. Each
time this spreadsheet is used, there may be a different number of line items
than in previous or subsequent runs (I may have 39 lines one time, and 60 the
next time). I have column headers in row "A" and I want the subtotal to be
three lines below the last row of data. The spreadsheet is sorted with all
rows with a value in column "C", then all rows with a a value in column "D".
Is there a way to do this?

Thanks in advance.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 26
Default Column Subtotals with variable number of items

On 2 Jan, 18:35, brentm wrote:
Ok, I must concede defeat and ask the VBA gurus out there for help.

I have a spreadsheet that I need to subtotal column C and Column D. *Each
time this spreadsheet is used, there may be a different number of line items
than in previous or subsequent runs (I may have 39 lines one time, and 60 the
next time). *I have column headers in row "A" and I want the subtotal to be
three lines below the last row of data. *The spreadsheet is sorted with all
rows with a value in column "C", then all rows with a a value in column "D". *
Is there a way to do this?

Thanks in advance.


Hi Brent,

I may be missing your exact need but If you insert a SUM formula and
then insert rows for new records above that line then a SUM formula
will automatically expand to include the extended range.
Have you got a sample workbook?

Anthony
http://www.excel-ant.co.uk
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35
Default Column Subtotals with variable number of items

Thanks. But, yes, I was not very clear as to my intentions. I have a macro
that runs, and I was hoping to add this ability into the macro. My goal is
to have this basically 100% automated and this was the final piece that I was
unable to figure out. If all else fails, then this step can be manual, but I
was hoping to have it all automatic. Any other ideas?

"excel-ant" wrote:

On 2 Jan, 18:35, brentm wrote:
Ok, I must concede defeat and ask the VBA gurus out there for help.

I have a spreadsheet that I need to subtotal column C and Column D. Each
time this spreadsheet is used, there may be a different number of line items
than in previous or subsequent runs (I may have 39 lines one time, and 60 the
next time). I have column headers in row "A" and I want the subtotal to be
three lines below the last row of data. The spreadsheet is sorted with all
rows with a value in column "C", then all rows with a a value in column "D".
Is there a way to do this?

Thanks in advance.


Hi Brent,

I may be missing your exact need but If you insert a SUM formula and
then insert rows for new records above that line then a SUM formula
will automatically expand to include the extended range.
Have you got a sample workbook?

Anthony
http://www.excel-ant.co.uk

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
Subtotals of Items in A Column based on Spec. Values found in Colu Brad Excel Discussion (Misc queries) 1 November 17th 08 03:59 PM
How to sum a variable number of items RobinC Excel Worksheet Functions 2 May 30th 08 08:14 AM
Count number of items in one column that have a value in another? onthefritz Excel Worksheet Functions 5 December 10th 05 04:19 PM
Number of different items in a column [email protected] Excel Programming 3 March 9th 05 10:29 PM
Count number of unique items in a column that contains duplicates Steembeem Excel Worksheet Functions 3 February 2nd 05 12:51 AM


All times are GMT +1. The time now is 05:42 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"