Sample Data
This table shows names of students and their scores.
| Cell | Value |
|---|---|
| A1 | Name |
| B1 | Score |
| A2 | Alice |
| B2 | 85 |
| A3 | Bob |
| B3 | 92 |
| A4 | Charlie |
| B4 | 78 |
| A5 | Diana |
| B5 | 90 |
| A6 | Evan |
| B6 | 88 |
This table shows names of students and their scores.
| Cell | Value |
|---|---|
| A1 | Name |
| B1 | Score |
| A2 | Alice |
| B2 | 85 |
| A3 | Bob |
| B3 | 92 |
| A4 | Charlie |
| B4 | 78 |
| A5 | Diana |
| B5 | 90 |
| A6 | Evan |
| B6 | 88 |
=SORTN(A2:B6, 3, 0, 2, FALSE)A B +-------+-------+ 1 | Name | Score | +-------+-------+ 2 | Alice | 85 | <-- 3 | Bob | 92 | <-- 4 | Charlie| 78 | <-- 5 | Diana | 90 | <-- 6 | Evan | 88 | <-- Arrows show the data range A2:B6 used in the formula.
D E +-------+-------+ 1 | Name | Score | +-------+-------+ 2 | Bob | 92 | 3 | Diana | 90 | 4 | Evan | 88 | This is the output of the formula =SORTN(A2:B6, 3, 0, 2, FALSE) showing top 3 scores sorted descending.