Column Subtotals with variable number of items

B

brentm

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.
 
E

excel-ant

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
 
B

brentm

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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top