Find the 2nd largest value in a range that includes duplicates if the condition in another range is met

treyabrown

New Member
Joined
May 23, 2014
Messages
7
I have a formula to find 2nd largest value in a range with dulicates

=LARGE(IF(rangeB<LARGE(B2:B500,1),B2:B500),1)> < LARGE(</LARGE(B2:B500,1),B2:B500),1)>rangeB,1),rangeB),1)

I also have another formula to find the second largest value given the condition that the

=LARGE(IF(rangeA="cell value",rangeB),2)

These 2 formulas do what I need but I do not know how to combine them to seach for a portion of the range (based on another range condition) and return the 2nd largest value (given the values are duplicated).I appreciate any help on this, Thanks.<LARGE(B2:B500,1),B2:B500),1)>

</PRE></LARGE(B2:B500,1),B2:B500),1)>
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
Let A:B house the relevant data wth headers in the first row.

E1: KAD (a condition of interest)

E2: Distinct largest values

E3, control+shift+enter, not just enter, and copy down:
Rich (BB code):
=IF(ROWS($E$3:E3)<=2,LARGE(IF($A$2:$A$100=$E$1,
  IF(1-ISNUMBER(MATCH($B$2:$B$100,$E$2:E2,0)),$B$2:$B$100)),
  ROWS($E$3:E3)),"")
 
Upvote 0

Forum statistics

Threads
1,215,419
Messages
6,124,796
Members
449,189
Latest member
kristinh

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