Can COUNTIF be nested to search two ranges

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I need to use COUNTIF to search multiple ranges for combinations of answers

e.g Column A contains "colour", column B contains "shape"

I want to count how many blue circles there are etc...
 
I would concatenate columna A and B and then countif the concatenated string

Example:
A1 = purple
B1 = square
C1 = CONCATENATE(A1,B1) --> yields purplesquare

Assume this goes to row 10

=COUNTIF(C1:C10,"purplesquare") gives you a count of purple squares

Dave
 
OR use the SUMPRODUCT function

=sumproduct(--(a1:a100="blue"),--(b1:b100="square))

would give you the total of blue squares - longer formula, but doesn't
need a new column to concatenate the result.
 

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

Back
Top