ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   conditions in "countif" (https://www.excelbanter.com/excel-discussion-misc-queries/68703-conditions-countif.html)

Clash

conditions in "countif"
 

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 include
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.

Cheers


--
Clash
------------------------------------------------------------------------
Clash's Profile: http://www.excelforum.com/member.php...o&userid=18951
View this thread: http://www.excelforum.com/showthread...hreadid=507155


Bob Phillips

conditions in "countif"
 
=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)

"Clash" wrote in message
...

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 include
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.

Cheers


--
Clash
------------------------------------------------------------------------
Clash's Profile:

http://www.excelforum.com/member.php...o&userid=18951
View this thread: http://www.excelforum.com/showthread...hreadid=507155




daddylonglegs

conditions in "countif"
 

One of those you quoted should work

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

or alternatively

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


--
daddylonglegs
------------------------------------------------------------------------
daddylonglegs's Profile: http://www.excelforum.com/member.php...o&userid=30486
View this thread: http://www.excelforum.com/showthread...hreadid=507155


Clash

conditions in "countif"
 

many thanks boths:)


--
Clash
------------------------------------------------------------------------
Clash's Profile: http://www.excelforum.com/member.php...o&userid=18951
View this thread: http://www.excelforum.com/showthread...hreadid=507155



All times are GMT +1. The time now is 11:23 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com