Sorting with a Formula
February 18, 2022 - by Bill Jelen

Problem: In Rank Scores, I learned how to use the RANK function to find the relative rank order of four writers. Now I want to use a formula to produce a sorted list of the writers in high-to-low sequence.
Strategy: In cells A8:A11, you enter the ranks 1 through 4. Then you use the VLOOKUP function to return the name in column B and the pages in column C.

1. Set up a new table with numbers 1 through 4.
2. The formula in B8:B11 is
=VLOOKUP($A8,$A$2:$C$5,2,FALSE)
.-
3. The formula in C8:C11 is
=VLOOKUP($A8,$A$2:$C$5,3,FALSE)
.
After using a RANK function to assign rank values to a list, you can use a second table with the numbers 1 through n and a series of VLOOKUP formulas in order to return a sorted list of the data.
This article is an excerpt from Power Excel With MrExcel