How to combine duplicate values in excel
Tutor 5 (95 Reviews)
Excel Tutor
Still stuck with a Excel question
Ask this expertAnswer
To combine duplicate values in Excel, there are multiple methods depending on whether you want to sum, concatenate, or remove duplicates while keeping the data combined.
Method 1: Using the Remove Duplicates Feature
To remove duplicates and keep a single instance of each value:
Select the range of cells containing duplicates.
Go to the Data tab on the ribbon.
Click Remove Duplicates.
In the pop-up, select the columns you want to check for duplicates.
Click OK. Excel will keep the first instance of each value and remove the rest.
Note: This method deletes duplicates instead of combining them. Use it when unique values are needed.
Method 2: Using the SUMIF Function to Combine Numeric Duplicates
To combine or sum duplicates numerically:
Suppose column A contains names and column B contains amounts.
Use the formula in column C to sum duplicates:
\text{=SUMIF(A:A, A2, B:B)}
Drag the formula down. Column C will show the total for each duplicate name.
Remove duplicates in column A if you want unique names with their summed values.
Method 3: Using TEXTJOIN to Combine Text Duplicates
To combine text values for duplicates into one cell:
Select a blank column for the combined text.
Use the formula (Excel 2019 and later or Office 365):
\text{=TEXTJOIN(", ", TRUE, IF(A:A=A2, B:B, ""))}
Press Ctrl + Shift + Enter if using older Excel versions (array formula).
This formula will concatenate all values in column B for duplicate entries in column A, separated by a comma.
Method 4: Using a Pivot Table to Combine Duplicates
Pivot Tables are powerful for summarizing duplicates:
Select the data range.
Go to the Insert tab → PivotTable.
Place the duplicate column in the Rows area.
Place the numeric or text column in the Values area.
For text, choose Value Field Settings → Max or use Power Query to combine text.
Pivot Tables provide totals, counts, and combinations automatically without manual formulas.
Method 5: Using Power Query to Combine Duplicates
Power Query allows an advanced combination of duplicates, including merging text and numbers:
Select the data → Data tab → Get & Transform → From Table/Range.
In Power Query Editor, select the column with duplicates.
Click Group By.
Choose Sum, Count, or All Rows depending on your needs.
Click Close & Load to return the combined results to Excel.
These methods cover numeric sums, text concatenation, and complete data consolidation. Using Pivot Tables or Power Query is preferred for large datasets to avoid complex formulas.
. 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
What is the formula to highlight duplicate values
Answers · 1
What is the formula to remove duplicates
Answers · 1
How to delete duplicate values in excel
Answers · 1
How to delete duplicate rows based on one column
Answers · 1