fxExcelReps

← How-to guides

How to Find the Top 5 Values in Excel

=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()/100000 to 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.

Practise it

LARGESMALLINDEXSORT

Think you know this?

15 formula tasks, no hints, with a leaderboard. Absolute, relative and mixed references included.

Take the Pro Challenge →

More how-to guides

How to Check If a Cell Is Blank in Excel

Test whether a cell is empty in Excel with IF and an empty string or ISBLANK, and leave a result blank until the inputs are filled in.

How to Make a Running Total in Excel

Create a running total (cumulative sum) in Excel with SUM and a mixed reference, so each row shows the total so far. Live example.

How to Calculate a Weighted Average in Excel

Calculate a weighted average in Excel with SUMPRODUCT divided by SUM, for interest rates, grades or prices, and why AVERAGE is wrong.

How to Convert Text to Numbers in Excel

Fix numbers stored as text in Excel with Convert to Number, Text to Columns, VALUE or the double minus, so SUM and lookups work again.