Formula Question

coachdp3

New Member
Joined
Feb 13, 2011
Messages
47
Office Version
  1. 365
Platform
  1. Windows
=INDEX($BJ$4:$BJ$33,LARGE($BJ$4:$BP$33,3))

I have the above formula for a form I've made and it works as long as the info in BP33 stays in order from 1 - 33. When I change the order I get a "REF" error. Any idea why?

I need excel to find the 3rd largest value in an array. The way its set up above, it works as long as the numbers are in order. What if they are out of order? Thanks
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
=INDEX($BJ$4:$BJ$33,LARGE($BJ$4:$BP$33,3))

I have the above formula for a form I've made and it works as long as the info in BP33 stays in order from 1 - 33. When I change the order I get a "REF" error. Any idea why?

I need excel to find the 3rd largest value in an array. The way its set up above, it works as long as the numbers are in order. What if they are out of order? Thanks

Invoke just:

=LARGE($BJ$4:$BP$33,3)
 
Upvote 0
Thank you for responding. The formula by itself only returns the 3rd highest number but I need excel to return the other portion of the array.

Example:

The Array:

Column "A" has the names John, Mark, & Chris
Column "B" has the ages of each. 10, 15, & 20

Your formula returns the 3rd highest age (20).
I need the formula to return who is 20 (Chris).

This was why I used =INDEX(

Any ideas?
 
Upvote 0
Something like

=INDEX($BJ$4:$BJ$33,MATCH(LARGE($BP$4:$BP$33,3),$BP$4:$BP$33,0))
 
Upvote 0
Thank you for responding. The formula by itself only returns the 3rd highest number but I need excel to return the other portion of the array.

Example:

The Array:

Column "A" has the names John, Mark, & Chris
Column "B" has the ages of each. 10, 15, & 20

Your formula returns the 3rd highest age (20).
I need the formula to return who is 20 (Chris).

This was why I used =INDEX(

Any ideas?

Your INDEX bit was referencing the same range as your LARGE bit. That led me to believe that you were just interested having the 3rd largest value.

Let A2:B5 house:

John
Mark
Chris
Jason

and

10
15
20
10

Note that the 3rd largest value is 10.

D1: 3

D2, just enter:
Code:
=COUNTIF(B2:B5,LARGE(B2:B5,D1))

D4, control+shift+enter, not just enter:
Code:
=IF(ROWS($D$4:D4)<=$D$2,INDEX($A$2:$A$5,
    SMALL(IF($B$2:$B$5=LARGE($B$2:$B$5,$D$1),
      ROW($A$2:$A$5)-ROW($A$2)+1),ROWS($D$4:D4))),"")
 
Upvote 0

Forum statistics

Threads
1,224,602
Messages
6,179,841
Members
452,948
Latest member
UsmanAli786

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