SUBTOTAL function

A

awb762

Is there any way to total the values that are created by the sub-total
function in a grand total? I know the grand total is designed to IGNORE the
SUBTOTAL function values when calculating the grand total, but how can I get
it to include ONLY the SUBTOTAL function values?
 
S

Sheeloo

Why do you want to do that? How will it be different from the 'grand total'
excluding sub total values?
 
A

awb762

In a case where I have a continuity of numbers. For example, say I want to
track the number of units I have in inventory on a monthly basis. I have a
column set up where each cell references the one above, then adds or
subtracts purchases and sales from other columns to come to ending monthly
inventory (ie in cell C2 I have the formula +C1+A2-B2. This formula is
repeated 12 times in a column, and then this block of 12 is repeated for each
individual inventory item. I'm trying to find a way to capture the last of
those 12 values for each inventory item , so I can sum total units in
inventory across multiple inventory items that all tracked on the same
worksheet.
 
S

Sheeloo

You must have some way to indicate which cells you want to add up
for example if you have the SubTotal in Col D for the rows you want to add
up then use this formula
=SUMPRODUCT(--(D1:D500="SubTotal"),(C1:C500))

Adjust 500 to your last row... this formula can be anywhere other than the
range C1:D500
 

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