View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.newusers
T. Valko T. Valko is offline
external usenet poster
 
Posts: 15,768
Default COUNTIF or something else?

Try this...

=SUMPRODUCT(--(C2:C15=1),--((D2:D15="yes")+(E2:E15="yes")=2))

--
Biff
Microsoft Excel MVP


"Count-Adi" wrote in message
...
I am trying to use COUNTIF function where the range might vary. For
instance,
I want to know how many yes I have in column D and E together, with the
condition that C will be only equal with 1.

C D E
1
1 Yes
1 Yes
1
2 Yes
2
2 Yes
3 Yes
3 Yes
3 Yes
3

{=COUNTIF(IF($C$1:$C$11=1,$D$1:$E$11,0),"yes")} should be 2.

Thanks for your help.