PC Review


Reply
Thread Tools Rate Thread

Column Subtotals with variable number of items

 
 
brentm
Guest
Posts: n/a
 
      2nd Jan 2009
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.
 
Reply With Quote
 
 
 
 
excel-ant
Guest
Posts: n/a
 
      2nd Jan 2009
On 2 Jan, 18:35, brentm <bre...@discussions.microsoft.com> 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 60the
> 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 withall
> 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 With Quote
 
brentm
Guest
Posts: n/a
 
      2nd Jan 2009
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 <bre...@discussions.microsoft.com> 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 With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Subtotals for a variable number of rows bud i Microsoft Excel Programming 3 7th Apr 2010 09:36 AM
How to find a column number using variable criteria? RobofMN Microsoft Excel Worksheet Functions 2 9th Apr 2009 04:41 PM
How do I put a variable column number in the sum() function? BobC Microsoft Excel Worksheet Functions 7 23rd Nov 2008 07:17 PM
Subtotals of Items in A Column based on Spec. Values found in Colu Brad Microsoft Excel Misc 1 17th Nov 2008 03:59 PM
How to sum a variable number of items RobinC Microsoft Excel Worksheet Functions 2 30th May 2008 08:14 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:44 AM.