Figure out offset to correct row

MetLife

Active Member
Joined
Jul 2, 2012
Messages
334
Office Version
  1. 365
Hi,

I used a LARGE function to find the largest value in column "X" based on some conditions. It happens that the column "X" is a column of losses, but column "B" is the policy number for that loss.

So the LARGE function finds the largest loss but I also need to find the corresponding policy number.

2nd largest loss = LARGE(($X$14:$X$175000) * ($D$14:$D$175000=1)*($AD$14:$AD$175000=TRUE),2)

Is there a way to use MATCH() to get the offset, for column "B"?
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
Are you trying to get the largest, or 2nd largest value from col X?
 
Upvote 0
The largest varies, so I was setting it to "$CU12" because I copied the LARGE function down and CU13=2, CU14=3,... etc...

= LARGE(($X$14:$X$175000) * ($D$14:$D$175000=1)*($AD$14:$AD$175000=TRUE),$CU12)

So I need an offset for each nth LARGEST value
 
Upvote 0
Ok how about
Excel Formula:
=TAKE(SORT(CHOOSECOLS(FILTER($B$14:$X$175000,($D$14:$D$175000=1)*($AD$14:$AD$175000=TRUE)),-1,1),1,-1),5)
This will return the 5 largest values from col X along with the value in col B. Change the 5 at the end to however many rows you want.
 
Upvote 0
Solution
Ok how about
Excel Formula:
=TAKE(SORT(CHOOSECOLS(FILTER($B$14:$X$175000,($D$14:$D$175000=1)*($AD$14:$AD$175000=TRUE)),-1,1),1,-1),5)
This will return the 5 largest values from col X along with the value in col B. Change the 5 at the end to however many rows you want.
I tried it but got a "SPILL!" error. Any ideas?
 
Upvote 0
Clear all cells below & to the right of the formula
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,224,820
Messages
6,181,160
Members
453,021
Latest member
Justyna P

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