How to remove duplicates in Excel: Remove Duplicates, UNIQUE and choosing columns
Remove duplicate rows in Excel: the Remove Duplicates button, the UNIQUE function, which columns to check and how to keep the most recent record instead of the first.
A shop’s customer base records every purchase as a separate row. For an SMS campaign each customer must appear once, or Aziz gets the same message three times. Or an operator typed the same record twice — and the report shows sales doubled.
Excel has two main ways to fix this: the Удалить дубликаты button (changes the original data) and the UNIQUE function (leaves the original alone and returns a separate clean list). And the key question is always the same: which columns have to match for a row to count as a duplicate?
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Name | Phone | Purchase date | |
| 2 | Aziz Karimov | 90 123 45 67 | 03.10.2025 | |
| 3 | Dilnoza Rakhimova | 93 555 11 22 | 05.10.2025 | |
| 4 | Aziz Karimov | 90 123 45 67 | 12.10.2025 | |
| 5 | Javokhir Turaev | 97 700 33 44 | 14.10.2025 | |
| 6 | Dilnoza Rakhimova | 93 555 11 22 | 05.10.2025 | |
| 7 | Malika Yusupova | 99 888 77 66 | 20.10.2025 | |
| 8 | Aziz Karimov | 90 123 45 67 | 25.10.2025 | |
| 9 |
Method 1: Data → Remove Duplicates
1
Click any cell in the table (or select the whole table A1:C8). On the Данные tab click Удалить дубликаты.
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Name | Phone | Purchase date | |
| 2 | Aziz Karimov | 90 123 45 67 | 03.10.2025 | |
| 3 | Dilnoza Rakhimova | 93 555 11 22 | 05.10.2025 | |
| 4 | Aziz Karimov | 90 123 45 67 | 12.10.2025 | |
| 5 | Javokhir Turaev | 97 700 33 44 | 14.10.2025 | |
| 6 |
2
Make sure My data has headers is ticked — otherwise the header row is treated as data. Now the key decision: keep only the Phone column (Unselect All → Phone). In other words, “same phone number = same customer”.
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Name | Phone | Purchase date | |
| 2 | Aziz Karimov | 90 123 45 67 | 03.10.2025 | |
| 3 | Dilnoza Rakhimova | 93 555 11 22 | 05.10.2025 | |
| 4 | Aziz Karimov | 90 123 45 67 | 12.10.2025 | |
| 5 |
3
Click OK. Excel reports: “3 duplicate values found and removed; 4 unique values remain”. The first row for each phone stays; the others are deleted entirely.
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Name | Phone | Purchase date | |
| 2 | Aziz Karimov | 90 123 45 67 | 03.10.2025 | |
| 3 | Dilnoza Rakhimova | 93 555 11 22 | 05.10.2025 | |
| 4 | Javokhir Turaev | 97 700 33 44 | 14.10.2025 | |
| 5 | Malika Yusupova | 99 888 77 66 | 20.10.2025 | |
| 6 |
The most important choice: which columns?
Remove Duplicates deletes a row only when all ticked columns match. Same table, two different results:
- All columns ticked (the default): only row 6 is removed — it is an exact copy of row 3. Aziz Karimov’s three purchases stay because the dates differ. Use this to clean up double-entered records.
- Phone only: 3 rows are removed and one row per customer remains. Use this for a list of unique customers.
Rule: first ask “do I need unique customers or a clean log?” — then tick the boxes.
Method 2: UNIQUE — without touching the original
1
In an empty spot (say E2) type =УНИК(A2:B8). The result spills automatically into as many rows as needed: each name+phone pair once.
| A | B | C | D | E | F | G | |
|---|---|---|---|---|---|---|---|
| 1 | Name | Phone | Name | Phone | |||
| 2 | Aziz Karimov | 90 123 45 67 | Aziz Karimov | 90 123 45 67 | |||
| 3 | Dilnoza Rakhimova | 93 555 11 22 | Dilnoza Rakhimova | 93 555 11 22 | |||
| 4 | Aziz Karimov | 90 123 45 67 | Javokhir Turaev | 97 700 33 44 | |||
| 5 | Javokhir Turaev | 97 700 33 44 | Malika Yusupova | 99 888 77 66 | |||
| 6 | Dilnoza Rakhimova | 93 555 11 22 | |||||
| 7 | Malika Yusupova | 99 888 77 66 | |||||
| 8 | Aziz Karimov | 90 123 45 67 | |||||
| 9 |
2
Need it alphabetical? =СОРТ(УНИК(A2:B8)). Only values that occur exactly once (e.g. customers with a single purchase): =УНИК(A2:B8;;ИСТИНА).
3
UNIQUE is available in Excel 2021 and 365. If the spill area is occupied you get #SPILL! — clear the cells below the formula.
Pro level: keep the most recent record
Remove Duplicates always keeps the first row it meets. In our example Aziz Karimov kept the old purchase from 03.10. If you need the latest purchase date:
- First sort the table by Purchase date newest to oldest (Данные → Сортировка от Я до А).
- Then remove duplicates by Phone — each customer’s newest row is now on top, so that is the one that stays.
Count duplicates before deleting: =СЧЁТЗ(B2:B8)-СЧЁТЗ(УНИК(B2:B8)) → 3. Flag each row: =СЧЁТЕСЛИ($B$2:B2;B2)>1 — rows showing TRUE are the ones that will go.
If the data is refreshed weekly, set up a Remove Duplicates step once in Power Query (Получить данные) — after that Обновить все repeats the cleanup. Note that Power Query is case-sensitive.
Try it in the simulator
Type =СЧЁТЕСЛИ($B$2:B2;B2) in D2 and fill down to D8: 2 or more means a repeat. Then type =УНИК(A2:B8) in F2 to get the list of unique customers.
| A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | Name | Phone | Date | Occurrence | ||||||||||||||||||||
| 2 | Aziz Karimov | 90 123 45 67 | 03.10 | |||||||||||||||||||||
| 3 | Dilnoza Rakhimova | 93 555 11 22 | 05.10 | |||||||||||||||||||||
| 4 | Aziz Karimov | 90 123 45 67 | 12.10 | |||||||||||||||||||||
| 5 | Javokhir Turaev | 97 700 33 44 | 14.10 | |||||||||||||||||||||
| 6 | Dilnoza Rakhimova | 93 555 11 22 | 05.10 | |||||||||||||||||||||
| 7 | Malika Yusupova | 99 888 77 66 | 20.10 | |||||||||||||||||||||
| 8 | Aziz Karimov | 90 123 45 67 | 25.10 | |||||||||||||||||||||
| 9 | ||||||||||||||||||||||||
| 10 | ||||||||||||||||||||||||
| 11 | ||||||||||||||||||||||||
| 12 |
Has ExcelLab been useful?
Support the project and help us release new lessons and exercises.