How to merge duplicate values in excel
Tutor 5 (73 Reviews)
Excel Tutor
Still stuck with a Excel question
Ask this expertAnswer
Merging duplicate values in Excel means consolidating repeated entries so that each unique value appears once. There are multiple approaches depending on whether you want to remove duplicates entirely, combine related data, or summarize information.
Method 1: Remove Duplicate Values
-
Select the range of cells containing duplicates.
-
Go to the Data tab.
-
Click Remove Duplicates.
-
In the dialog box, check the columns you want to examine for duplicates.
-
Click OK. Excel will keep the first occurrence and remove the rest.
Note: On a Mac, the Data tab works the same, but the dialog box may look slightly different with checkboxes for columns to consider.
Method 2: Merge Duplicate Values Using Formulas
To combine duplicate entries into one cell or summarize associated data, use the TEXTJOIN function.
Example: Combine duplicate names into one cell.
-
Assume column A has names and column B has associated values.
-
Use the formula:
=TEXTJOIN(", ", TRUE, IF(A$2:A$10=A2, B$2:B$10, ""))
-
Press Ctrl+Shift+Enter for array formulas on older Excel versions.
-
The result will merge all corresponding values for duplicates in column A.
Method 3: Consolidate Data
-
Select an empty cell where you want the merged result.
-
Go to the Data tab → Consolidate.
-
Choose the Function to summarize data (Sum, Average, Count, etc.).
-
Select the Reference Range with duplicates.
-
Check Top row and Left column if your data has labels.
-
Click OK. Excel will merge duplicates and summarize values.
Method 4: Using Pivot Tables
-
Select your data range.
-
Go to Insert → Pivot Table.
-
Drag the column with duplicates into the Rows field.
-
Drag associated data into the Values field.
-
Choose a calculation method (Sum, Count, Average).
Pivot Tables automatically group duplicate values, giving a clear summary.
Method 5: Using Power Query (for Advanced Merging)
-
Select your data range.
-
Go to Data → Get & Transform Data → From Table/Range.
-
In Power Query, select the column with duplicates.
-
Click Remove Duplicates or Group By to merge values.
-
Click Close & Load to return the cleaned data to Excel.
Note: Power Query is available in modern Excel versions and works similarly on both Windows and Mac.
Merging duplicate values depends on your goal: remove them, combine them into a single cell, or summarize them. Using Remove Duplicates, TEXTJOIN, Pivot Tables, or Power Query ensures accurate consolidation.
. 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