What is the formula to automatically remove duplicates in excel
Tutor 5 (134 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?
Related Questions
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 freeze a row in excel
Answers · 1
How to freeze the top three rows in excel
Answers · 1
How to freeze the top two rows in excel
Answers · 1
How to freeze top row excel mac
Answers · 1