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

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top