Countif for two conditions

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!
 
R

RagDyer

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!
 
M

Michael

Hi Kenny

Use the following:

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

With Ctrl + Shift + Enter to finish

Regards
Michael
 

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