• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

special subtotal

momi

New Member
Hi, I have a question, I have a list of agents (first column) with team leaders (second column) and with let's say letters: a, b, c, d (in a third column). I need to count how many "b" letters are there, but with filter turned on second column: e.g. Team_leader_1. thanks for your help, regards, Michal (momi@email.cz)
 
If we refer to the criteria in second column as LeaderName, your formula is:

=SUMPRODUCT(--(B2:B100=LeaderName),--(C2:C100="b"))
 
HI, thanks, I used the formula, but the result is always same, although I am changing filter..., what I am doing wrong?
 
Ah, sorry, missed the part about a filter. For that, you need a helper column with this formula:

=SUBTOTAL(103,A2)

(I'm assuming there's actually something in col A)


Assuming the helper column is col d, the formula would be:

=SUMPRODUCT(--(C2:C100="b"),D2:D100)


How it works?

The subtotal function will display 1 if the row is visible, and has a value of 0 if row is not visible. plugging this into the SUMPRODUCT allows us to only look at visible rows that have a "b" in col C.
 
Back
Top