Sorting with a Formula


February 18, 2022 - by

Sorting with a Formula

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.


The reason that I need every rank to appear once is that I will later do a VLOOKUP to sort the data high-to-low.
Figure 341. The table in rows 8:11 sorts the original data.
  • 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

Title photo by NIKHIL on Unsplash