Excel 365 + Google Sheets · SORT + UNIQUE
A clean A–Z list in one formula
UNIQUE removes repeats, SORT puts them in order. Perfect for drop-down lists.
The formula
=SORT(UNIQUE(A2:A7))What each part means
UNIQUE(A2:A7)Each value onceSORT(...)A to Z
Example
| A | B | |
|---|---|---|
| 1 | City | Clean list |
| 2 | Madrid | |
| 3 | Lisbon | |
| 4 | Madrid | |
| 5 | Mexico City | |
| 6 | Lisbon | |
| 7 | Bogotá |
| A | B | |
|---|---|---|
| 1 | City | Clean list |
| 2 | Madrid | Bogotá |
| 3 | Lisbon | Lisbon |
| 4 | Madrid | Madrid |
| 5 | Mexico City | Mexico City |
| 6 | Lisbon | |
| 7 | Bogotá |
Step by step
- Click cell B2.
- Type the formula:
=SORT(UNIQUE(A2:A7)) - Press Enter.
- The results fill the cells below by themselves (it’s a dynamic array formula). Don’t type anything in them.
Where it works
- Excel 365 and Excel 2021 or newer
- Google Sheets
- Excel for the web (free)
The same formula in other languages
- English SORT + UNIQUE
- Español ORDENAR + UNICOS
- Português CLASSIFICAR + ÚNICO