COUNTIF with text criteria

A

Alexey

Help please.
I have troubles with COUNTIF. I need to count rows with two criteria in
different columns both are parts of text. For example: text1- “counting text
cellsâ€- criteria- “*text*â€; text2- “C00000005â€-criteria “*5*â€. My COUNTIF
doesn’t work.
 
G

Gary''s Student

Use SUMPRODUCT():

Say we have data like:

small cat
medium dog
large mouse
small bird
medium ant
large cat
small dog
medium mouse
large bird
small ant
medium cat
large dog
small mouse
medium bird
large ant
small cat
medium dog
large mouse
small bird
medium ant
large cat

To count the number of rows containing:

small cat

we can use:

=SUMPRODUCT(--(A1:A21="small")*(B1:B21="cat"))

Note that this can be expanded to include as many columns as you want.
 
A

Alexey

Thank you,
But what can we do if we have: very small, extremally small and small cats?
and how to cout all small cats?
 

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