Countif(a2:a10, "apples""pears""oranges")

A

Adam

Hi All,

I need to perform a countif function however need to have 4 different
criteria's. Is this possible and if so please can you provide an example.

Many Thanks.
 
J

JulieD

Hi Adam

=SUMPRODUCT((A2:A10="Apples")+(A2:A10="Pears")+(A2:A10="Oranges")+(A2:A10="Bananas"))

will give you the number of items in the list that are one of the nominated
fruits.

Cheers
JulieD
 
R

RagDyer

Add the Countif's together:

=SUM(COUNTIF(A2:A10,{"apples","pears","oranges","kiwi"}))
--

HTH,

RD
==============================================
Please keep all correspondence within the Group, so all may benefit!
==============================================

Hi All,

I need to perform a countif function however need to have 4 different
criteria's. Is this possible and if so please can you provide an example.

Many Thanks.
 
A

Aladin Akyurek

JulieD said:
Hi Adam

=SUMPRODUCT((A2:A10="Apples")+(A2:A10="Pears")+(A2:A10="Oranges")+(A2:A10="Bananas"))

will give you the number of items in the list that are one of th
nominated
fruits.
[...]

Better to switch to IsNumber|Match, given the number of conditions t
OR...

=SUMPRODUCT(--ISNUMBER(MATCH(A2:A10,{"Apples","Pears","Oranges","Bananas"},0))
 
Top