Criteria-Based Subtotals

  • Thread starter Thread starter Michael
  • Start date Start date
M

Michael

Hi! I was wondering what the best way would be to subtotal
a column if it met certain criteria. For instance,
{=IF(AND(a2:a100="NFC",b2:b100<today()),sum(k2:k100))}

The result of using the array is FALSE because the last
condition IS false. That tells me it's not adding each
cell that meets the condtions to a running subtotal. This
is easy to do in SAS with a SET BY, but I can't get Excel
to replicate that action.

Any suggestions?

Thank you!!

Michael
 
Frank, you are a saint. That is the coolest thing I've
ever seen. I've been using Excel extensively for years and
would never have come up with that. THANKS SO MUCH!!

Leave work early and go get a warm beer on me!

Michael
 
Just move your sum and replace AND with multiplication

=Sum(IF((a2:a100="NFC")*(b2:b100<today()),(k2:k100))

and array enter it.
 
Michael said:
Frank, you are a saint. That is the coolest thing I've
ever seen. I've been using Excel extensively for years and
would never have come up with that. THANKS SO MUCH!!

Leave work early and go get a warm beer on me!

Michael
I prefer a COLD beer :-))
thanks for your feedback
Frank
 

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

Back
Top