RANK with INDEX MATCH

tigerzen

Board Regular
Joined
Mar 8, 2023
Messages
209
Office Version
  1. 365
Platform
  1. Windows
Trying to create a dynamic lookup which will rank the results. Idea is to select a year and then have the numbers ranked. Column J is my initial attempt so please ignore, but I'm helping an Excel 2019 user with Index Match so if the solution could incorporate INDEX MATCH great, if I'm off the mark and there is a quicker function then I'll take that.


Book3
ABCDEFGHIJ
1Name202020212022Year required -->2021Rank
2Tom473149331
3Jack204916149
4Fred121728417
5Peter114444244
Sheet3
Cell Formulas
RangeFormula
J2:J5J2=INDEX($B$2:$D$5,,MATCH($G$1,$B$1:$D$1,0))
H2:H5H2=RANK(C2,$C$2:$C$5)
Dynamic array formulas.
Cells with Data Validation
CellAllowCriteria
G1List=$B$1:$D$1
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
Came up with this in column J, looks a little long-winded though.
Book3
ABCDEFGHIJ
1Name202020212022Year required -->2021Rank
2Tom47314933
3Jack20491611
4Fred12172844
5Peter11444422
Sheet3
Cell Formulas
RangeFormula
H2:H5H2=RANK(C2,$C$2:$C$5)
J2:J5J2=RANK(INDEX($B$2:$D$5,ROWS($A$2:A2),MATCH($G$1,$B$1:$D$1,0)),INDEX($B$2:$D$5,,MATCH($G$1,$B$1:$D$1,0)))
Cells with Data Validation
CellAllowCriteria
G1List=$B$1:$D$1
 
Upvote 0
Like this?

23 08 28.xlsm
ABCDEFGH
1Name202020212022Year required -->2021Rank
2Tom4731493
3Jack2049161
4Fred1217284
5Peter1144442
Rank
Cell Formulas
RangeFormula
H2:H5H2=RANK(INDEX(B2:D2,MATCH(G$1,B$1:D$1,0)),INDEX(B$2:D$5,0,MATCH(G$1,B$1:D$1,0)))
 
Upvote 0
Solution
Like this?

23 08 28.xlsm
ABCDEFGH
1Name202020212022Year required -->2021Rank
2Tom4731493
3Jack2049161
4Fred1217284
5Peter1144442
Rank
Cell Formulas
RangeFormula
H2:H5H2=RANK(INDEX(B2:D2,MATCH(G$1,B$1:D$1,0)),INDEX(B$2:D$5,0,MATCH(G$1,B$1:D$1,0)))
Perfect, knew there had to be a shorter way.
 
Upvote 0

Forum statistics

Threads
1,223,894
Messages
6,175,252
Members
452,623
Latest member
Techenthusiast

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