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
 
Hi mtyrrell13,

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

There seems to be small mistake. The range E21:E1000 = "ACTIVE" is not equal to other ranges in the formula. It should be E2:E1000="ACTIVE". Please change this and confirm whether it is working.
 
Upvote 0

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
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.

balajayan, I was looking for a large if with 2 criteria and this worked for me, thank you much!
 
Upvote 0
balajayan, I was looking for a large if with 2 criteria and this worked for me, thank you much!
Excel now also has the AGGREGATE function that can enable this sort of calculation without the Ctrl+Shift+Enter requirement.

For example, below looking for the 2nd largest value in column C where Col A is "Yes" and col B is from 1 to 3.

Excel Workbook
ABCDEF
1Yes1450Col AYes
2Yes5600Col B min1
3No1800Col B Max3
4Yes2900n2
5Yes3200Result500
6No4300
7Yes0800
8Yes2500
nth largest
 
Last edited:
Upvote 0
Excel now also has the AGGREGATE function that can enable this sort of calculation without the Ctrl+Shift+Enter requirement.

For example, below looking for the 2nd largest value in column C where Col A is "Yes" and col B is from 1 to 3.

Excel Workbook
ABCDEF
1Yes1450Col AYes
2Yes5600Col B min1
3No1800Col B Max3
4Yes2900n2
5Yes3200Result500
6No4300
7Yes0800
8Yes2500
nth largest

I have used that function in Power BI, but was not aware that it was also in Excel now, thank you!
 
Upvote 0

Forum statistics

Threads
1,224,521
Messages
6,179,285
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