How to find and merge duplicates in excel
Tutor 5 (73 Reviews)
Excel Tutor
Still stuck with a Excel question
Ask this expertAnswer
Finding duplicates in Excel means identifying repeated values in a range, column, or row. Excel highlights or extracts these values through built-in tools like Conditional Formatting, Remove Duplicates, or advanced filtering. To find duplicates in Excel:
1. Using Conditional Formatting
This method highlights repeated values.
-
Select the range that you want to check.
-
Open Home > Conditional Formatting.
-
Choose Highlight Cells Rules.
-
Choose Duplicate Values.
-
Choose a formatting style.
-
Click OK.
Excel highlights all repeated values. Windows and Mac follow the same process.
2. Using the COUNTIF Method (No LaTeX needed)
This method identifies duplicates by labeling them in a new column.
-
Create a helper column next to your data.
-
Enter:
=COUNTIF($A$1:$A$100, A1) -
Fill down.
-
Any value greater than 1 marks a duplicate.
COUNTIF works the same on Windows and Mac.
3. Using the Unique Filter
This method filters your data so duplicates remain visible.
-
Select your data range.
-
Open Data > Advanced.
-
Select Filter the list, in-place.
-
Uncheck Unique records only if you want duplicates visible.
-
Apply the filter.
Windows and Mac both support the Advanced Filter.
How to merge duplicates in Excel
Merging duplicates means combining repeated records into one row while keeping related information intact. Excel requires manual control because each dataset varies.
1. Using Remove Duplicates to keep unique entries
This method deletes repeated rows entirely.
-
Select your dataset.
-
Open Data > Remove Duplicates.
-
Select the columns that determine uniqueness.
-
Confirm the removal.
Excel keeps the first instance and removes the rest.
2. Using Power Query to merge duplicate records
This method groups repeated values and merges their related fields.
Windows supports Power Query in all modern versions.
Mac supports Power Query in Excel 365 with limited grouping features.
Steps:
-
Select the data.
-
Open Data > Get & Transform Data > From Table/Range.
-
Load your data into Power Query.
-
Use Group By to consolidate duplicates.
-
Choose Operation (Sum, Min, Max, All Rows, etc.).
-
Load the clean dataset back into Excel.
3. Manually merging duplicate rows
Use this when each duplicate has different details you want to combine.
-
Sort the data to bring duplicates together.
-
Select the repeated rows.
-
Use Merge Cells if combining text into a single cell.
-
Use
TEXTJOIN,CONCAT, or&to combine information.
Example:
-
=TEXTJOIN(", ", TRUE, A1:A3)merges the text from multiple duplicates.
How to prevent duplicates in the future
Excel blocks duplicates through Data Validation.
-
Select the range for new entries.
-
Open Data > Data Validation.
-
Set Allow to Custom.
-
Enter:
=COUNTIF($A:$A, A1)=1 -
Apply to the full input range.
Excel stops duplicate entries with an error message.
What method works best?
-
Highlighting works best for visual inspection.
-
Remove Duplicates works best for datasets with identical rows.
-
Power Query works best for merging complex records.
-
COUNTIF works best for audits and reports.
-
Data Validation works best for preventing future duplication.
Each method targets a different workflow, and Excel maintains consistent behavior across versions except for Power Query differences on Mac.
. Was this Helpful?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