CountIF based on multiple conditions

  • Thread starter Thread starter PC
  • Start date Start date
P

PC

Hello
I simply want to count entries based on more than one
condition. I understand how to count for one condition--
which in my example is: =COUNTIF(H3:H349,"yes");

I'd also like to count entries for example of employees
in our 'West' region (cells D3-D349) who also need
training -'Yes' (cells H3-H349). I tried this entry
below--I added parenthesis, etc and nothing is working
for me. Any assistance is greatly appreciated. PC

=COUNT(IF(H3:H349,"yes")+(D3:D349,"West")))
 
Hi PC!

One way:

=SUMPRODUCT(($D$3:$D$349="West")*($H$3:$H$349="Yes"))

--
Regards
Norman Harker MVP (Excel)
Sydney, Australia
(e-mail address removed)
Excel and Word Function Lists (Classifications, Syntax and Arguments)
available free to good homes.
 
Hi
COUNTIF only accepts one condition. Use
=SUMPRODUCT((H3:H349,"yes")*(D3:D349="West"))
instead

HTH
Frank
 
Hi
I found out the solution. Evidently you can not use
COUNTIF for multiple criteria. You must use SUMIF instead.

Additionally it's important that you put the equation in
an array. This is achieved--after you input your
equation. You must enter SHIFT, CTRL, ENTER(RETURN)
simultaneously. That's very important--as I had also
attempted the SUMIF but did not realize this bit of
information. Here's an example of the equation that
worked for me--to count those employees in our 'West'
region (cells D4-D349) who need training -'Yes' (cells H4-
H349).

{=SUM(IF((H4:H349="yes") * (D4:D349="West"),1,0))}

Please note the symbol {} is what the system places
automatically around the equation when you enter SHIFT,
CTRL, ENTER(RETURN). Best Regards, PC
 
PC said:
I found out the solution. Evidently you can not use
COUNTIF for multiple criteria. You must use SUMIF instead.
....

See the other responses because there are better ways to do this than what
you think you've discovered.
 
Back
Top