Countif for two conditions

  • Thread starter Thread starter KENNY
  • Start date Start date
K

KENNY

I would like to find a formula (preferably not using
DCOUNTA) that would return the number of times a Dog was
sold by Joe....



Column A Column B
-------- ---------
Dog Steve
Dog Joe
Cat Bob
Hamster Bob
Cat Joe
Snake Steve
Dog Joe



Thanks in advance!
 
To make this a bit more versatile, let's put the name to count and the
animal to count in separate cells, so that they can be easily revised,
without having to change the formula itself.

Enter animal to count in C1.
Enter name to count in D1.

And try this formula:

=SUMPRODUCT((A1:A20=C1)*(B1:B20=D1))
--

HTH,

RD
==============================================
Please keep all correspondence within the Group, so all may benefit!
==============================================




I would like to find a formula (preferably not using
DCOUNTA) that would return the number of times a Dog was
sold by Joe....



Column A Column B
-------- ---------
Dog Steve
Dog Joe
Cat Bob
Hamster Bob
Cat Joe
Snake Steve
Dog Joe



Thanks in advance!
 
Hi Kenny

Use the following:

=SUM((A1:A7="Dog")*(B1:B7="Joe"))

With Ctrl + Shift + Enter to finish

Regards
Michael
 
Back
Top