How to identify duplicates in excel without deleting
Tutor 5 (37 Reviews)
Excel Tutor
Still stuck with a Excel question
Ask this expertAnswer
Combining duplicates in Excel involves identifying repeated entries in a dataset and merging their associated values. This is useful for summarizing data, consolidating records, or calculating totals for repeated items. There are several approaches depending on the type of data and the desired outcome.
1. Using the Remove Duplicates Feature
Remove Duplicates only deletes repeated rows, keeping the first occurrence. It does not combine numeric values automatically.
Steps:
-
Select the dataset you want to process.
-
Go to the Data tab.
-
Click Remove Duplicates.
-
Choose the columns that define a duplicate.
-
Click OK to remove duplicate entries.
Note: This method keeps only one copy of each unique value and discards the rest.
2. Using the Consolidate Tool
The Consolidate tool merges duplicates and can sum, count, or average the values.
Steps:
-
Select an empty cell where you want the results to appear.
-
Go to the Data tab and click Consolidate.
-
Choose the function to use (Sum, Count, Average, etc.).
-
Select the range of your data in the Reference box.
-
Check Top row and Left column if your data has headers.
-
Click OK.
Example: If two rows have the same product name but different sales, the Consolidate function with Sum will total the sales for that product.
3. Using Pivot Tables
Pivot Tables efficiently combine duplicates and summarize data.
Steps:
-
Select your dataset.
-
Go to Insert → PivotTable.
-
Drag the column with duplicates to the Rows area.
-
Drag the column with values (e.g., sales) to the Values area.
-
Set the value field settings to Sum, Count, or Average as needed.
Example: If a dataset lists product sales with repeated product names, the Pivot Table will combine duplicate names and show total sales for each product.
4. Using Formulas
Formulas can dynamically combine duplicates.
a) SUMIF Formula
The SUMIF function totals values for duplicates.
Formula:
=SUMIF(A:A, A2, B:B)
-
A:Ais the column with duplicate entries. -
A2is the value to match. -
B:Bis the column with numeric values to sum.
Example: In a sales table, if “Product X” appears multiple times, SUMIF adds all sales for “Product X” in a new summary column.
b) UNIQUE + SUMIF (Dynamic Arrays in Excel 365)
For modern Excel:
=SUMIF(A:A, UNIQUE(A:A), B:B)
This produces a summary of each unique entry with its corresponding totals.
5. Using Power Query
Power Query is a robust tool for merging duplicates and transforming data.
Steps:
-
Select your dataset.
-
Go to Data → Get & Transform → From Table/Range.
-
In Power Query, select the column with duplicates.
-
Click Group By.
-
Choose Sum, Count, or another aggregation for the grouped values.
-
Click Close & Load to insert the cleaned table into Excel.
Example: Multiple transactions for a customer can be grouped by customer ID and summed to get total sales per customer.
6. Differences Between Windows and Mac
-
The Remove Duplicates, Pivot Table, and Consolidate features are identical on Windows and Mac.
-
Power Query is fully available in Windows. Mac has limited Power Query functionality in older versions, but supports grouping and aggregating in modern Excel 365.
Combining duplicates in Excel depends on whether you want to remove duplicates, sum values, or create a dynamic summary. Pivot Tables and Power Query are ideal for large datasets, while formulas like SUMIF are efficient for small to medium datasets.
Get Online Tutoring or Questions answered by Experts.
You can post a question for a tutor or set up a tutoring session
Answers · 1
Why are margins not working
Answers · 1
Why is page layout not working
Answers · 1
How to print repeated rows on top in excel
Answers · 1
How to print header on each page
Answers · 1