LARGE Function with multiple criteria

ExcelHelpPls

New Member
Joined
Jun 20, 2011
Messages
10
Greetings,

I'm hoping someone can help me with this problem that I'm guessing there is an easy answer too (but i can't figure it out).

I'm trying to find the nth largest value of a column "C" based on criteria from both column "A" and "B". For example:

A B C
Yes 1 500
Yes 5 600
No 1 800
Yes 2 900

The logic I need to folllow is "If column A = "Yes" and column B = "1 or 2 or 3" return the nth largest value in column C of all values that meet those two requirements.

I was able to use the LARGE function with an IF statement to return the correct value of one criteria (LARGE(IF(A1:A5="Yes",C1:C5),1), but can't figure out how to add the second criteria.

Any help would be greatly appreciated.

Thank you
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
Greetings,

I'm hoping someone can help me with this problem that I'm guessing there is an easy answer too (but i can't figure it out).

I'm trying to find the nth largest value of a column "C" based on criteria from both column "A" and "B". For example:

A B C
Yes 1 500
Yes 5 600
No 1 800
Yes 2 900

The logic I need to folllow is "If column A = "Yes" and column B = "1 or 2 or 3" return the nth largest value in column C of all values that meet those two requirements.

I was able to use the LARGE function with an IF statement to return the correct value of one criteria (LARGE(IF(A1:A5="Yes",C1:C5),1), but can't figure out how to add the second criteria.

Any help would be greatly appreciated.

Thank you
Try something like this...

I've assumed the numbers in column B will range from 1 to n. No zeros, no empty cells and no negative numbers.

Array entered**:

=LARGE(IF(A2:A5="yes",IF(B2:B5<=3,C2:C5)),n)

** array formulas need to be entered using the key
combination of CTRL,SHIFT,ENTER (not just ENTER).
Hold down both the CTRL key and the SHIFT key
then hit ENTER.

Where n = the nth largest value that you want.
 
Upvote 0
T. Valko: I used dummy data to keep the post simple, but my column "B" is not a number, but a text (so instead of 1, "Tier 1").


Desu Nota: I tried yours, but it's throwing a "FALSE" for the output. It might be only checking one cell for the criteria?

Thank you very much for the respones.
 
Upvote 0
See if the below formula is of use:
Code:
=IF($B3<=3,LARGE(IF(--($A$3:$A$6="Yes"),$C$3:$C$6),$B3),"")

Saw your post after posting :D
Code:
=IF(ABS(RIGHT($B3,1))<=3,LARGE(IF(--($A$3:$A$6="Yes"),$C$3:$C$6),ABS(RIGHT($B3,1))),"")
 
Last edited:
Upvote 0
Hi,

Try the below:

Code:
LARGE(IF((A1:A7="YES")*((B1:B7="Tier 1")+(B1:B7="Tier 2")),C1:C7),2)

The above is array formula. Please press Control+Shift+Enter instead just Enter after keying in the formula.
Modify the range and constant values as per your requirement.
 
Upvote 0
T. Valko: I used dummy data to keep the post simple, but my column "B" is not a number, but a text (so instead of 1, "Tier 1").
Thank you very much for the respones.
That is why you should NEVER use dummy data! ;)

Ok, try this...

Book1
ABC
2YesTier 183
3NoTier 214
4NoTier 244
5NoTier 265
6YesTier 320
7YesTier 15
8NoTier 492
9YesTier 442
10NoTier 174
11___
12YesTier 15
13_Tier 2_
Sheet1

This array formula** entered in C12:

=LARGE(IF(A2:A10=A12,IF(ISNUMBER(MATCH(B2:B10,B12:B13,0)),C2:C10)),n)

Where n = the nth largest value you want. In the sample N=2.
 
Upvote 0
Thank you all for your help!

balajayan's solution seems to have worked. I will try out the others as well when i get a minute and report back for anyone else that may use the info on this thread.

Thanks again!
 
Upvote 0
Thanks for the quick feedback.

balajayan - I am trying a variation of your suggested code and coming up with an error

'{=LARGE(IF((E21:E1000="ACTIVE")*((S2:S1000="ORG A")+(J2:J1000=,">="&Z2)),M2:M1000),1)}

What I am trying to do is build an array of "ACTIVE" records only, that are owned by "ORG A", that have an end date on or before 12/31/13 (the value in Cell Z2), the return the Largest value in Column M that meet the above criteria
 
Upvote 0

Forum statistics

Threads
1,224,521
Messages
6,179,275
Members
452,902
Latest member
Knuddeluff

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top