How can I remove duplicate rows in Excel based on two columns? 2

How can I remove duplicate rows in Excel based on two columns?

The process of removing duplicate rows in Excel based on two columns involves identifying and eliminating rows that have identical values in both columns. This can be achieved by using built-in Excel functions or by creating a custom formula. By removing duplicate rows, the data can be streamlined and more accurate information can be obtained. This process is often used to clean up data sets and improve the overall quality of data analysis in Excel.

Excel: Remove Duplicate Rows Based on Two Columns


Often you may want to remove duplicate rows based on two columns in Excel.

Fortunately this is easy to do using the Remove Duplicates function within the Data tab.

The following example shows how to use this function in practice.

Example: Remove Duplicates Based on Two Columns in Excel

Suppose we have the following dataset that shows the team name and position of various basketball players:

Notice that there are several duplicates across both columns.

For example:

  • There are multiple players who have a team of A and a position of Guard.
  • There are multiple players who have a team of A and a position of Forward.

And so on.

To remove these rows that have duplicates across two columns, we need to highlight the cell range A1:B16 and then click the Data tab along the top ribbon and then click Remove Duplicates:

In the new window that appears, make sure the box is checked next to My data has headers and make sure the boxes next to Team and Position are both checked:

Once you click OK, the rows with duplicate values across both columns will automatically be removed:

Excel tells us that 6 duplicate rows were found and removed and that 9 unique rows remain.

For example:

  • There is only one row where Team is equal to A and Position is equal to Guard.
  • There is only one row where Team is equal to A and Position is equal to Forward.

And so on.

Additional Resources

The following tutorials explain how to perform other common operations in Excel:

Cite this article

stats writer (2024). How can I remove duplicate rows in Excel based on two columns?. PSYCHOLOGICAL SCALES. Retrieved from https://scales.arabpsychology.com/stats/how-can-i-remove-duplicate-rows-in-excel-based-on-two-columns/

stats writer. "How can I remove duplicate rows in Excel based on two columns?." PSYCHOLOGICAL SCALES, 28 Jun. 2024, https://scales.arabpsychology.com/stats/how-can-i-remove-duplicate-rows-in-excel-based-on-two-columns/.

stats writer. "How can I remove duplicate rows in Excel based on two columns?." PSYCHOLOGICAL SCALES, 2024. https://scales.arabpsychology.com/stats/how-can-i-remove-duplicate-rows-in-excel-based-on-two-columns/.

stats writer (2024) 'How can I remove duplicate rows in Excel based on two columns?', PSYCHOLOGICAL SCALES. Available at: https://scales.arabpsychology.com/stats/how-can-i-remove-duplicate-rows-in-excel-based-on-two-columns/.

[1] stats writer, "How can I remove duplicate rows in Excel based on two columns?," PSYCHOLOGICAL SCALES, vol. X, no. Y, ص Z-Z, June, 2024.

stats writer. How can I remove duplicate rows in Excel based on two columns?. PSYCHOLOGICAL SCALES. 2024;vol(issue):pages.

Download Post (.PDF)
Slide Up
x
PDF
Scroll to Top