PDA

View Full Version : Solved: COUNTIF using multiple criteria



francri
04-19-2011, 08:23 AM
Hi All,

I have a spreadsheet that contains filtering info in Column A (A2:A30).

I would like to Count the number of instances where specific criteria are true - criteria are ="Direct" or ="Direct (ES)"

Is there a simple way of wiriting a COUNTIF(OR( formula or can I write a COUNTIF formula that essentially counts all cells (A2:A30) that contain "Dir" that way I would capture both instances

Thanks in advance for any help with this.

Bob Phillips
04-19-2011, 08:31 AM
=COUNTIF(rng,"Direct")+COUNTIF(rng,"Direct (ES)")

or

=SUMPRODUCT(--(rng={"Direct","Direct (ES)"}))

or

=COUNTIF(rng,"Dir*")

BrianMH
04-19-2011, 08:38 AM
enter this as an array formula


=SUM(IF(ISERROR(SEARCH("dir",A2:A30,1)),0,1))


edit: beaten once again

francri
04-19-2011, 08:42 AM
=COUNTIF(rng,"Direct")+COUNTIF(rng,"Direct (ES)")

or

=SUMPRODUCT(--(rng={"Direct","Direct (ES)"}))

or

=COUNTIF(rng,"Dir*")

Thanks xld, I was over complicating it!!!