Skip to content

How to get the top 5 values in Excel in Excel

Return the five largest values, and the names that go with them, using SORT and TAKE, or LARGE for older versions.

A product list has a revenue figure on every row and you want a leaderboard of the top five.

In Microsoft 365 the neatest answer is two functions: sort descending, then take the first five rows. SORT arranges the values, and TAKE keeps the top of the result.

=TAKE(SORT(B2:B13, , -1), 5)

The empty second argument of SORT is the sort column, which is not needed for a single column. The -1 is the sort order: descending. The five results spill down from the cell you typed in.

To show the names of the top five instead of the amounts, sort the names by the amounts with SORTBY: =TAKE(SORTBY(A2:A13, B2:B13, -1), 5). Put it in its own column beside the amounts and the two lists line up.

In versions without dynamic arrays, LARGE returns the nth largest value. =LARGE(B$2:B$13, ROWS(D$2:D2)) filled down five rows gives the first, second, third and so on, because ROWS(D$2:D2) counts 1, 2, 3 as it grows. It works anywhere but you copy it down yourself and the names need a lookup.

If you only want to highlight the top five in place, the ribbon way is Home > Conditional Formatting > Top/Bottom Rules > Top 10 Items, then change 10 to 5. To filter, use Data > Filter, open the number filter and choose Top 10. Ties can make a filter return more than five rows. The Analysis track goes deeper on sorting and filtering with formulas.

3 ways to do it

1TAKE and SORT

=TAKE(SORT(B2:B13,,-1),5)

  1. In D2 type =TAKE(SORT(B2:B13,,-1),5) and press Enter.
  2. The five largest values spill down from D2, so leave D3:D6 empty.
  3. For the matching names, use SORTBY on the names with the amounts as the sort key, and take the first five.

2LARGE filled down (any version)

=LARGE(B$2:B$13,ROWS(D$2:D2))

  1. In D2 type =LARGE(B$2:B$13,ROWS(D$2:D2)).
  2. Fill down for five rows. ROWS counts 1, 2, 3 as the range grows, so you get the first, second and third largest.

3Highlight or filter on the ribbon

  1. Highlight: select the amounts, then Home > Conditional Formatting > Top/Bottom Rules > Top 10 Items, change 10 to 5, and select OK.
  2. Filter: turn on Data > Filter, open the amount filter, choose Number Filters > Top 10, and set it to show Top 5 Items.

Try it yourself

Solve it in the sheet. Every answer is checked, with hints if you need them.

Task 1 of 2

In D2, list the five largest revenue figures from B2:B13, largest first.

Answer in D2.

D2
A
B
C
D
E
F
1
Product
Revenue
Top 5 revenue
Top 5 products
2
Anvil
12,400
3
Bellows
8,300
4
Chisel
15,200
5
Drill
9,700
6
Easel
4,100
7
File
18,900
8
Gauge
6,200
9
Hammer
21,300
10
Jig
7,800
11
Kiln
13,600
12
Lathe
5,400
13
Mallet
10,100
14

Learn it properly, one graded sheet at a time.

Data analysis with formulas covers this in lesson 11, SORT and SORTBY.