=LARGE(B2:B100, 1) returns the largest value, =LARGE(B2:B100, 2) the second largest, and so on. To get the name next to each value, look it up with INDEX/MATCH or XLOOKUP. In Microsoft 365, SORT and TAKE do the whole ranking in one formula.
{"cells": {"A1": "Rank", "A10": "Anna", "A11": "Ivan", "A12": "Maria", "A13": "George", "A14": "Elena", "A15": "Peter", "A16": "Ani", "A17": "Boris", "A2": 1, "A3": 2, "A4": 3, "A9": "Rep", "B1": "Sales", "B10": 9800, "B11": 8400, "B12": 15200, "B13": 6900, "B14": 11300, "B15": 12100, "B16": 7600, "B17": 10400, "B2": "=LARGE($B$10:$B$17,A2)", "B3": "=LARGE($B$10:$B$17,A3)", "B4": "=LARGE($B$10:$B$17,A4)", "B9": "Sales", "C1": "Rep", "C2": "=INDEX($A$10:$A$17,MATCH(B2,$B$10:$B$17,0))", "C3": "=INDEX($A$10:$A$17,MATCH(B3,$B$10:$B$17,0))", "C4": "=INDEX($A$10:$A$17,MATCH(B4,$B$10:$B$17,0))"}, "focus": "B2", "formats": {"B10:B17": {"dec": 0, "fmt": "number"}, "B2:B4": {"dec": 0, "fmt": "number"}}, "note": "Change Anna\u0027s sales in B10 to 16000 and watch the ranking."}
LARGE with a rank column
Put 1, 2, 3… next to it and lock the data range.
=LARGE($B$2:$B$100, A2)The value ranked A2.=INDEX($A$2:$A$100, MATCH(B2, $B$2:$B$100, 0))The name for that value.SORT and TAKE (Microsoft 365)
One formula returns the whole top 5 with names.
=TAKE(SORT(A2:B100, 2, -1), 5)The 5 rows with the highest values in column B.=SORT(A2:B100, 2, -1)The full ranking.The smallest values
SMALL is the mirror of LARGE.
=SMALL($B$2:$B$100, 1)The lowest value.Common mistakes
- The same name appears twice
- Two people have the same value, and MATCH always finds the first. Use SORT in Microsoft 365, or a helper column that adds
ROW()/100000to break ties. - #NUM! error
- You asked for rank 10 in a list of 8 numbers.
Frequently asked questions
How do I get the top 5 by a condition?
In Microsoft 365: =TAKE(SORT(FILTER(A2:B100, C2:C100="North"), 2, -1), 5).
How do I highlight the top 5 in the data?
Conditional Formatting → Top/Bottom Rules → Top 10 Items and change 10 to 5.
What's LARGE(range, 1)?
The same as MAX. See LARGE.