Countif with two terms

F

FreddieP

Hi, I would like to count the number of the letter F in column A if column
B=x and column C=y (both terms must be fulfilled.)

I tried countif with no success.

what formula should I use?
 
R

Ron Coderre

Try one of these:

=SUMPRODUCT(--(A2:A20="F"),--(B2:B20="X"),--(C2:C20="Y"))
or...
=SUMPRODUCT(--(A2:A20="F")*(B2:B20="X")*(C2:C20="Y"))

Alternatively, if "X" and "Y" refer to values in other cells,
perhaps something like this:
=SUMPRODUCT(--(A2:A20="F"),--(B2:B20=D1),--(C2:C20=E1))

Adjust range references to suit your situation.

Does that help?
Post back if you have more questions.

Regards,

Ron
Microsoft MVP - Excel
 

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