# How to get the top 3 values with SORTN in Google Sheets

Give SORTN the range, how many rows, a ties mode, the column and FALSE for descending: `=SORTN(A2:B11,E1,0,2,FALSE)`.

**Google Sheets:** `=SORTN(A2:B11,E1,0,2,FALSE)`

**Excel:** Excel has no SORTN. In Excel 2024 or Microsoft 365, use `=TAKE(SORT(A2:B11,2,-1),E1)`.

## Example

Sample data (row 1 is the header):

| A | B | C | D | E |
| --- | --- | --- | --- | --- |
| Rep | Sales |  | Top | 3 |
| Ana Ruiz | 48200 |  |  |  |
| Raj Patel | 61750 |  |  |  |
| Lee Chen | 39900 |  |  |  |
| Kim Ortiz | 57300 |  |  |  |
| Mo Diaz | 57300 |  |  |  |
| Sam Cole | 44150 |  |  |  |
| Eve Lund | 66400 |  |  |  |
| Noor Ali | 30500 |  |  |  |
| Ivy Shah | 52900 |  |  |  |
| Tom Reyes | 41800 |  |  |  |

Formula in D3: `=SORTN(A2:B11,E1,0,2,FALSE)`

Result (spills 3 × 2): Eve Lund, $66,400; Raj Patel, $61,750; Kim Ortiz, $57,300

## How it works

SORTN sorts the range by column 2 (sales), descending because of FALSE, and returns the first `E1` rows. The third argument, the ties mode, decides what happens at the cut-off: 0 returns exactly 3 rows, so Mo Diaz, tied with Kim Ortiz on 57,300, is left out.

## Other ways

- `=SORTN(A2:B11,E1,1,2,FALSE)`: Ties mode 1 also returns every row tied with the last one. (Four rows: Mo Diaz is included with Kim Ortiz.)
- `=TAKE(SORT(A2:B11,2,-1),E1)`: The Excel version.

## Common mistakes

- The order argument is TRUE for ascending and FALSE for descending; leaving it out sorts smallest first, which gives the bottom 3.
- Ties modes 2 and 3 remove duplicate rows; they are for de-duplicating, not for ranking.

## Questions

**How do I get the bottom 3?**

Sort ascending: `=SORTN(A2:B11,3,0,2,TRUE)`.

**How do I return just the names?**

Give SORTN the names and a separate sort range: `=SORTN(A2:A11,3,0,B2:B11,FALSE)`.

Every formula and result on this page was checked by running it in the Spreadsheet Practice formula engine on 2026-10-30.

Source: https://spreadsheetpractice.com/formulas/top-values-with-sortn
