Two Condition "Countif" with a Twist

D

Dave

This is a variation on the usual "countif" with two conditions
question.

I have two columns of data. One contains a category number, the other
a string of text comments. Example:

A B
1 1010 "ps, le, te, ss"
2 1010 "ps"
3 1020 "ss, te"
4 1020 "le, ps"

I'd like to count the number of cells with a specific category number
in Column A that contain certain text in Column B.

Several previous posts have described how to use a "Sum" array
function handle counting with two conditions. This method would look
something like this:
{=sum((A1:A4=1010)*(B1:B4="le"))}

Unfortunately, this doesn't work properly. None of the cells in Column
B actually have the value "le". Using wildcards doesn't seem to work
either (eg: "*le*"). Any advice?

Thanks,
Dave
 
J

Jerry W. Lewis

Multiple conditions are handle with SUMIF (or SUM, but SUM must be array
entered).
=SUMIF((condition1)*((condition2)+(condition3)))
counts the number of times that condition1 occurs AND (*) either
condition2 OR (+) condition3.

For your twist, use
ISNUMBER(FIND("le",B1:B4))
as the condition.

Jerry
 

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