SOLVED

COUNTIFS more values for each criteria

Copper Contributor

Dear colleagues,

 

I got stuck at a point I'm in need of you expert advice.:)

 

I wonder whether is it feasible to pick more than one value for each criteria. For instance, given the following expression:

 

=COUNTIFS('All OEs'!D:D;"Greengrocer's";'All OEs'!J:J;"Orange";'All OEs'!X:X;"Below Midpoint")

 

I would like to add another value to be counted along "Orange". Let's say I want the system to count oranges and apples at the same time.

 

Do you happen to know how? 

 

Thanks a lot!

 

 

5 Replies

@Asa94 

You can use

 

=SUM(COUNTIFS('All OEs'!D:D;"Greengrocer's";'All OEs'!J:J;{"Apple","Orange"};'All OEs'!X:X;"Below Midpoint"))

@Hans Vogelaar I tried entering the following expression: =SUM(COUNTIFS('All OEs'!D:D;"Greengrocer's";'All OEs'!G:G;{"Orange","Apple"};'All OEs'!X:X;"Below Midpoint")) but it triggered an error message. Is there any other way?

 

Thanks a lot!

best response confirmed by Asa94 (Copper Contributor)
Solution

@Asa94 

 

Does this work?

 

=SUM(COUNTIFS('All OEs'!D:D;"Greengrocer's";'All OEs'!G:G;{"Orange"\"Apple"};'All OEs'!X:X;"Below Midpoint"))

 

(With SUM and COUNTIFS translated to SUMA and CONTAR.SI.CONJUNTO if necessary)

@Hans Vogelaar Works perfectly now!

BTW, may I use the same structure multiple times? Hence I'd be able to count Oranges and Apples but also "Below Midpoint" and "Around Midpoint"

@Asa94 

Yes, you can use this multiple times.

1 best response

Accepted Solutions
best response confirmed by Asa94 (Copper Contributor)
Solution

@Asa94 

 

Does this work?

 

=SUM(COUNTIFS('All OEs'!D:D;"Greengrocer's";'All OEs'!G:G;{"Orange"\"Apple"};'All OEs'!X:X;"Below Midpoint"))

 

(With SUM and COUNTIFS translated to SUMA and CONTAR.SI.CONJUNTO if necessary)

View solution in original post