What is the formula to automatically remove duplicates in excel
Tutor 5 (87 Reviews)
Excel Tutor
Still stuck with a Excel question
Ask this expertAnswer
To automatically remove duplicates in Excel, you can use the UNIQUE function.
The UNIQUE function extracts distinct values from a range or array.
Syntax
UNIQUE(array, [by_col], [exactly_once])
array: The range of cells to check for duplicates.by_col: Optional. SetTRUEto compare columns,FALSE(default) to compare rows.exactly_once: Optional. SetTRUEto return values that appear only once.
Example
Suppose you have a list of names in cells A1:A10 with some duplicates:
| A |
|---|
| John |
| Mary |
| John |
| Peter |
| Mary |
| Alice |
| Bob |
| Alice |
| John |
| Sam |
You can remove duplicates by using the formula:
=UNIQUE(A1:A10)
The result will be:
| Result |
|---|
| John |
| Mary |
| Peter |
| Alice |
| Bob |
| Sam |
Remove values that appear only once
If you want values that appear only once (excluding all duplicates), use:
=UNIQUE(A1:A10, , TRUE)
This will return only Peter, Bob, and Sam from the previous example.
Notes
The
UNIQUEfunction is available in Excel 365 and Excel 2021.On older Excel versions, use Remove Duplicates in the Data tab manually or use a combination of
IF,COUNTIF, andFILTERformulas.
Do you want me to show the formula method for older Excel versions that do not support UNIQUE?
Get Online Tutoring or Questions answered by Experts.
You can post a question for a tutor or set up a tutoring session
Answers · 1
How to show duplicates in red
Answers · 1
How to apply duplicate conditional formatting rule
Answers · 1
How to duplicate conditional formatting excel
Answers · 1
What is excel conditional formatting duplicates
Answers · 1