Reputation: 709
I want to be able to count the amount of times a person (Name) appears with the answer yes or no in excel. Here is what my table basically looks like
Name | Answer
Greg | YES
Steve | YES
Jim | NO
Greg | NO
Greg | YES
Steve | NO
So I want to be able to count the amount of times Greg responded 'YES' and 'NO'. So I should be getting 'YES' 2 times.
I've tried vlookups
and countif
but I'm not really sure how to combine the 2 columns to get a count or when one equals the other. Can anyone help me with this?
I've also tried:
=SUMPRODUCT((A2:A6="Greg")*(B2:B6="YES"))
But I get the error "Range has no entry corresponding to this cell"
Upvotes: 0
Views: 1888
Reputation: 35843
I'm also using Google docs
If you are using google-spreadsheets, try this one:
=ARRAYFORMULA(SUMPRODUCT((A2:A6="Greg")*(B2:B6="YES")))
Upvotes: 3