SORT & UNIQUE practice exercises
UNIQUE removes duplicates from a list, and SORT orders a range by one or more columns. Combined, they turn a messy column into a clean, sorted list that updates by itself.
Syntax
UNIQUE(range) · SORT(range, sort_column, is_ascending)
UNIQUE(range)- Returns each distinct value (or row) once.
SORT(range, col, asc)- Sorts range by its col-th column;
TRUEfor A→Z / small→large,FALSEfor the reverse.
The practice data
An orders table: who sold what, where, and for how much. Every exercise below uses this sheet, and your answer goes in H2.
| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| 1 | Rep | Region | Product | Units | Price | Sales |
| 2 | Ana | East | Widget | 12 | 5 | 60 |
| 3 | Ben | West | Gadget | 5 | 20 | 100 |
| 4 | Cara | East | Gadget | 8 | 20 | 160 |
| 5 | Dev | North | Widget | 20 | 5 | 100 |
| 6 | Ana | West | Gizmo | 3 | 50 | 150 |
| 7 | Ben | East | Widget | 7 | 5 | 35 |
| 8 | Cara | North | Gizmo | 2 | 50 | 100 |
| 9 | Dev | East | Gadget | 6 | 20 | 120 |
Worked example
=UNIQUE(B2:B9)
Lists each Region once, in order of first appearance. Result:
| East |
| West |
| North |
Your turn: 3 exercises
Type a formula and press Enter. It is checked by a real formula engine, so any correct approach counts.
1 List each Product once.
2 List each Rep once, sorted A to Z.
3 Return the whole table (A2:F9) sorted by Sales, highest first.
Master SORT & UNIQUE in the full course
Lesson 15 of 18 goes deeper, with more exercises in a real spreadsheet grid. Start with the first 4 lessons free, then unlock everything with Pro.
Start free See pricingCommon SORT & UNIQUE mistakes
- Giving SORT a column letter instead of a column number within the range.
- Including the header row, which then gets sorted into the data.
- Expecting UNIQUE to sort. It keeps the original order; add SORT for that.
FAQ
How do I count unique values?
Use COUNTUNIQUE(A2:A9) or COUNTA(UNIQUE(A2:A9)).
Can I sort by two columns?
Yes: SORT(A2:F9,2,TRUE,6,FALSE) sorts by Region, then by Sales descending.