conditions in "countif"

C

Clash

Hi all,

can you give a countif formula more than one condition/criteria, e.g.
=countif(P:p,"female") and say for instance Blonde, how would I includ
the second criteria.

I tried a number of ways =countif(P:p,"female";"blonde")
=countif(P:p,"female")+countif(P:p,"blonde") but nothing works.

Cheer
 
B

Bob Phillips

=SUMPRODUCT(--(P2:p200={"female","blonde"}))

Note that SUMPRODUCT doesn't work with complete columns, you have to specify
a range..


--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)
 
D

daddylonglegs

One of those you quoted should work

=countif(P:p,"female")+countif(P:p,"blonde")

or alternatively

=sum(countif(P:p,{"female","blonde"}))
 
Top