Link to home
Create AccountLog in
Avatar of winstalla
winstallaFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Excel count matching criteria in multiple columns

I have an Excel Spreadsheet where I want to do something that seems very simple, but which is causing me some confusion.

Basically, I want to count the number of cells in column A that contain a specific value (e.g. "3") WHERE Column B on the same row matches another specific value (e.g. "4").

Example:
Column A          Column B
3                                  4
3                                  2
3                                  3
3                                  4
2                                  4

I want the answer to be 2 (since only 2 rows match the two required criteria!). But I can't figure out how to do it.

I've tried a COUNTIF function, even putting in an AND function, but I can't get it to work out the answer properly. I've had a brief look at SUMPRODUCT but I can't work it out. That's probably just me being a bit thick.

Any help, please!
ASKER CERTIFIED SOLUTION
Avatar of NBVC
NBVC
Flag of Canada image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
Avatar of winstalla

ASKER

That COUNTIFS works great! Thanks!