Intermediate

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?

Книга1 - Excel
—☐✕
fx
ABCD
1NamePhonePurchase date
2Aziz Karimov90 123 45 6703.10.2025
3Dilnoza Rakhimova93 555 11 2205.10.2025
4Aziz Karimov90 123 45 6712.10.2025
5Javokhir Turaev97 700 33 4414.10.2025
6Dilnoza Rakhimova93 555 11 2205.10.2025
7Malika Yusupova99 888 77 6620.10.2025
8Aziz Karimov90 123 45 6725.10.2025
9
Готово
Yellow: the same customer buying on a different day. Red: an exact copy of a row (entered twice)

Method 1: Data → Remove Duplicates

1

Click any cell in the table (or select the whole table A1:C8). On the Данные tab click Удалить дубликаты.

Книга1 - Excel
—☐✕
ФайлГлавнаяВставкаРазметка страницыФормулыДанныеРецензированиеВидСправка
Получить данныеОбновить все
Получить данные
СортировкаФильтр
Сортировка и фильтр
Текст по столбцамУдалить дубликатыПроверка данных
Работа с данными
A1fxName
ABCD
1NamePhonePurchase date
2Aziz Karimov90 123 45 6703.10.2025
3Dilnoza Rakhimova93 555 11 2205.10.2025
4Aziz Karimov90 123 45 6712.10.2025
5Javokhir Turaev97 700 33 4414.10.2025
6
ГотовоСреднее: 45938,5Количество: 15Сумма: 183754

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”.

Книга1 - Excel
—☐✕
A1fxName
ABCD
1NamePhonePurchase date
2Aziz Karimov90 123 45 6703.10.2025
3Dilnoza Rakhimova93 555 11 2205.10.2025
4Aziz Karimov90 123 45 6712.10.2025
5
ГотовоСреднее: 45936,6667Количество: 12Сумма: 137810

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.

Книга1 - Excel
—☐✕
fx
ABCD
1NamePhonePurchase date
2Aziz Karimov90 123 45 6703.10.2025
3Dilnoza Rakhimova93 555 11 2205.10.2025
4Javokhir Turaev97 700 33 4414.10.2025
5Malika Yusupova99 888 77 6620.10.2025
6
Готово
Each customer appears once — the SMS list is ready

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.

Книга1 - Excel
—☐✕
E2fx=УНИК(A2:B8)
ABCDEFG
1NamePhoneNamePhone
2Aziz Karimov90 123 45 67Aziz Karimov90 123 45 67
3Dilnoza Rakhimova93 555 11 22Dilnoza Rakhimova93 555 11 22
4Aziz Karimov90 123 45 67Javokhir Turaev97 700 33 44
5Javokhir Turaev97 700 33 44Malika Yusupova99 888 77 66
6Dilnoza Rakhimova93 555 11 22
7Malika Yusupova99 888 77 66
8Aziz Karimov90 123 45 67
9
ГотовоКоличество: 8
One formula, four unique customers. Add a row to A:B and the list updates itself

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:

  1. First sort the table by Purchase date newest to oldest (Данные → Сортировка от Я до А).
  2. 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.

Книга1 - Excel
—☐✕
Буфер обмена
Шрифт
Выравнивание
Число
Стили
Ячейки
Редактирование
✕✓fx
ABCDEFGHIJKLMNOPQRSTUVWX
1NamePhoneDateOccurrence
2Aziz Karimov90 123 45 6703.10
3Dilnoza Rakhimova93 555 11 2205.10
4Aziz Karimov90 123 45 6712.10
5Javokhir Turaev97 700 33 4414.10
6Dilnoza Rakhimova93 555 11 2205.10
7Malika Yusupova99 888 77 6620.10
8Aziz Karimov90 123 45 6725.10
9
10
11
12
Лист1
Готово

Has ExcelLab been useful?

Support the project and help us release new lessons and exercises.

Support us
Previous

144 / 154