Javatpoint Logo
Javatpoint Logo

How to Combine Duplicates in Excel

In Excel, joining or combining the columns and rows of data that include identical or comparable information is called "combining duplicates." This is frequently done to simplify and arrange datasets, removing duplication and facilitating information analysis and presentation. By combining or concatenating redundant values, the data is intended to be represented more concisely and logically.

Duplicate values are frequently encountered while entering data into Excel. For example, test mark sheets may include the names of two or more students. These duplicates can be excessive and disorganised, even though they help represent information.

To clean up your sheet, it is advisable to merge any duplicate values you encounter and extract only the unique ones. When needed, this will enable you to locate any information with ease. In Excel, merging duplicates entails removing all except distinctive numbers from the designated ranges. It is comparable to eliminating redundant data without sacrificing the original.

These same values can be combined into one sheet or several sheets. To find out how to handle the three scenarios listed below, continue reading.

Case 1: Merge Duplicates Rows and Columns

We have prepared four approaches to combine duplicated rows and columns inside the same sheet. Depending on the information you would like to acquire, use any method.

Remove Duplicates:

First, you can combine the row and Column duplicates inside the sheet using the Remove Duplicates menu. Only the unique values are retained after the identical values are immediately eliminated.

1. Mark the cell ranges in your spreadsheet that contain duplicates.

2. Click on the Data Tab. Choose the option to Remove Duplicates under Data Tools.

How to Combine Duplicates in Excel

3. To remove duplicates, choose the Column by checking the box under Columns. Press OK.

How to Combine Duplicates in Excel

Using Filter:

All identical entries in the data will be permanently removed using the Remove Duplicates menu. Use the Filter function to combine and extract information from a different worksheet section. Additionally, you can combine the parameters in the List directly here.

1. Start by drawing attention to the Sections on your worksheet.

2. Select the Data Tab. Then select the Advanced option from the Sort & Filter section.

How to Combine Duplicates in Excel

3. An Extended Filter window will appear on the screen. Select any option under Action.

Filter the List, in-place: By choosing this option, you can remove duplicates from the List itself.

Copy to another Location: Select this option to duplicate the Unique elements in a different location. Moreover, choose the cell area from the Copy to Choice.

4. Mark "Unique records only" in the box. Press OK.

How to Combine Duplicates in Excel

Using UNIQUE Function:

A UNIQUE Parameter is an additional way to combine duplicate columns and rows without erasing data. The UNIQUE function in Excel removes the same values from ranges and recovers unique values.

Syntax:

Assume the following data needs to have duplicates merged. To do this, type the following formula into a new cell.

How to Combine Duplicates in Excel

Only the formula will return the distinct names from the data?Sarah, David, Cameron, John, Paul, and Ginny.

Using PIVOT Table

If you want to combine duplicate items and summarise their value, use this approach. For example, add up all the names of the sales representatives and find the total amount they have sold.

1. Choose the data.

2. Navigate to the Insert tab and select PivotTable.

How to Combine Duplicates in Excel

3. Select New Spreadsheet or Existing Spreadsheet in the Create PivotTable window to import data. Press OK. (If the Existing Worksheet option is chosen, choose a new cell referencing under Location.)

How to Combine Duplicates in Excel

4. Select the desired Columns by checking the boxes on the PivotTable Fields panel on the right.

How to Combine Duplicates in Excel

Case 2: Merge Duplicates into Single Row

In some cases, you could want to combine the several repetitions into a single row, just like in the example image.

How to Combine Duplicates in Excel

We will combine columns, alter data, and compile all the information into a single row using the Microsoft Excel Query Editor tool to accomplish this.

1. Choose ranges on your worksheet.

2. Select From Table/Range from the Data Tab.

How to Combine Duplicates in Excel

3. In the Create Column window, check the box labelled "My table has headers" if prompted. Press OK.

How to Combine Duplicates in Excel

4. Choose the Column option from the Power Query Editor window. Navigate to the Transform tab and select Group By.

How to Combine Duplicates in Excel

5. Select the Basic or Advanced option in the Group By window to group columns. Here, we went with Basic.

How to Combine Duplicates in Excel

6. Put a name in the New column name field. Select All Rows under Operation. Click OK after that.

How to Combine Duplicates in Excel

7. Select Custom Column under the Add Column tab now.

How to Combine Duplicates in Excel

8. Once more, type the appropriate name in the New column's title area.

9. Enter Table as the formula below the Custom column formula. Column titled "Quantity Sold" ([Sales Person]). (The new grouped column in this instance is Sales Person. The second column in the Sales Person section is Quantity Sold.

How to Combine Duplicates in Excel

10. Click the Expand icon > Extraction Values in a new column.

How to Combine Duplicates in Excel

11. Select OK after choosing a delimiter to divide the values in the pop-up.

How to Combine Duplicates in Excel

12. Remove the Middle column now. Then select Close & Load from the Home Tab.

How to Combine Duplicates in Excel

Case 3: Merge Duplicates of Different Sheets

You may apply the Merge tool to merge duplicate data if it appears on multiple worksheets. This tool allows you to take the values from each sheet and transfer them into a new one.

1. In your workbook, create a new worksheet.

2. To insert combined data, click the Cell.

3. Click Consolidate from the Data Tab.

How to Combine Duplicates in Excel

4. Now select the Collapse symbol next to Reference. Navigate to an alternate sheet and choose the Cell ranges. To quit, click the Collapse icon once more.

How to Combine Duplicates in Excel

5. Click Add Now on All References.

How to Combine Duplicates in Excel

6. To add additional references from other sheets, repeat Steps 4 and 5.

How to Combine Duplicates in Excel

7. Hereunder, Check the boxes for the top row, then the left column, and use labels. Press OK.

How to Combine Duplicates in Excel

8. With the final amount, all of your values will be unique.

How to Combine Duplicates in Excel

Review and Validation:

The procedures of examination and verification are essential for merging duplicates in Excel. These procedures guarantee the precision and consistency of the connected data, assisting in detecting and correcting any possible mistakes that might have happened during the process of merging. We'll discuss the importance of evaluation and endorsement in this part, along with recommended practices.

  • Verifying Combined Data: Examining the output dataset is crucial after utilizing features like Remove Repetition or applying techniques like TEXTJOIN and CONCATENATE. Verification entails determining if the aggregated data adheres to data quality guidelines and produces the desired results.
  • Data Accuracy Check: Check whether the merged data faithfully captures the original data. Verify that nothing has been missed or improperly changed by cross-referencing the data with the source.
  • Visual Inspection: Examine the dataset to spot any irregularities or surprising trends. This might be particularly crucial when working with textual material with different formatting styles.
  • Data Consistency: Make the combined data's formatting and structure consistent. Verify that date formats, text capitalization, and other pertinent data properties are constant.

Addressing Potential Errors:

Errors and irregularities are frequently found during the evaluation process. Maintaining data accuracy depends on quickly recognizing and resolving these problems.

  • Error Types: Sort mistakes into common categories, such as formatting problems, missing data, and improper concatenation. Developing focused solutions requires an understanding of the nature of errors.
  • Error Tracing: To identify the possible source of mistakes, go back and review the phases involved in the combining process. This can entail checking functions, formulas, or the parameters for functionality like Remove Duplicates.
  • Testing Scenarios: Run tests using a tiny dataset or sample data section to see how various scenarios are handled. Taking a proactive stance can identify possible problems before applying the method to the complete dataset.Best Practices for Review and Validation:
  • Use Data Validation Tools: Excel has several features for data validation, including auditing, formula assessment, and error checking. Make use of these resources to methodically find and fix mistakes.
  • Create Data Validation Checks: Make sure that unique IDs stay unique even after merging data, for example, by implementing extra tests. Maintaining data consistency can be aided by establishing these checks.
    Document the Combining Process: Ensure the procedures followed during the merging process are documented. This documentation acts as a point of Reference for upcoming audits and studies.
  • Version Control: Put version control into your Excel file, if applicable. This guarantees that you can go back to a prior version of the data if needed and have an overview of the various stages of data processing.

Conclusion:

To summarise, merging duplicates in Spreadsheets is a basic yet complex procedure requiring thought and attention to best practices. Using techniques like CONCATENATE, TEXTJOIN, PivotTables, and the "Remove Duplicates" tool, users may efficiently simplify and arrange datasets, removing redundant information and promoting more effective data analysis. A more precise and cohesive dataset is produced due to the procedures taken, which range from locating and eliminating duplicates to combining and verifying the combined data. However, careful examination and confirmation are necessary for this procedure to be successful. The rigorous validation of the combined information for accuracy and the timely detection and correction of any possible flaws guarantee that the final report is consistent with the desired result. While Excel is a standard tool for organizing information, knowing how to merge duplicates allows users to use their data fully for reporting and decision-making in a well-informed manner.







Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA