Countif with two criterias

G

Guest

Hi all

I need your help. i need to use the countif but with two criterias ...
something like the sumproduct and the sum if.

Example:
Col. A Col. B
Joe Yes
John No
John No
Joe Yes
Joe No

I need to count how many Joe with Yes I have.

Thanks,
 
J

John Bundy

Easiest is to concantenate put this in C2
=A1&B1
then put your criteria in a column as one word
joeyes
then do your countif
=COUNTIF(C2:C6,D1)
 
B

Bob Phillips

=SUMPRODUCT(--(A2:A20="Joe"),--(B2:B20="Yes"))

--
---
HTH

Bob

(change the xxxx to gmail if mailing direct)
 
B

Bob Phillips

If you have Excel 2007, you can use

=COUNTIFS(A2:A20,"Joe",B2:B20,"Yes")

--
---
HTH

Bob

(change the xxxx to gmail if mailing direct)
 
G

Guest

Thanks Bob

"Bob Phillips" escreveu:
If you have Excel 2007, you can use

=COUNTIFS(A2:A20,"Joe",B2:B20,"Yes")

--
---
HTH

Bob

(change the xxxx to gmail if mailing direct)
 

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