Open In App

How to Compare Two Columns and Delete Duplicates in Excel

Last Updated : 01 Jul, 2025
Comments
Improve
Suggest changes
Like Article
Like
Report

Facing redundant data in your Excel and don't know how to compare two columns so you can easily de-duplicate Excel? Explore this guide to get the step-by-step instructions to compare two columns and delete duplicate data. Here you will learn multiple ways, like the equal operator, IF() function, and EXACT(), to find the duplicate.

How to Compare Two Columns in Excel?

In the upcoming section, we are going to discuss all possible method to compare two columns, so explore the methods and choose the right one for your Excel duplicate.

Compare Two Colums Using Equal Op

Comparing two columns in MS Excel

Follow the following steps to compare two columns in Excel:

Note: This tutorial is for MS Excel 2013. Steps can be different or the same for other versions of Excel.

Step 1: Open the Excel file on which you want to compare the columns. For Example, your data can look like this

Example-for-comparing-columns

Step 2: Select the columns and go to the Home tab > Style group> Conditional Formatting i.e first click on Home tab, then go to Style group and then select Conditional Formatting (as shown in the image below). Conditional formatting allows users to automatically apply formattings such as changing colors, data bars, and icons in the cells based on cell value.

Home-tab-Conditional-Formatting

Step 3:  After clicking on Conditional Formatting, a drop-down menu will appear. From the menu ribbon select the Highlight Cells Rules

Highlight-Cells-Rule

 Step 4: After selecting Highlight Cell Rule another drop down will appear and, select Duplicate Values

Duplicate-Values

Step 5: After selecting Duplicate Values, a dialogue box (given below) will appear. In the first space fill Duplicate and in the other space fill the color options that you want to duplicate values to be highlighted in. And click OK. The purpose of this step is to highlight the duplicate values. 

Duplicate-Values-dialogue-box

Step 6: After clicking OK. The duplicated values are highlighted. 

Highlighted-Duplicate-Values

Removing Duplicate Values

Step 1: We'll be adding a filter to columns A and B and for that go to Home Tab> Editing Group> Sort & Filter. Here, Sort & Filter will help to apply various filters such as sort in ascending, descending order and sort by color, and much more.

Sort-and-Filter

Step 2: After clicking on Sort & Filter, a dialogue box will appear (as shown below). From the dialogue box, select Filter

Select-Filter

Step 3: You'll see a downward arrow in the first cell of all the selected columns. After clicking on the downward arrow, a dialogue box will appear(as shown below). Select Filter by Color option.  

Filter-dialogue-box

Step 4: In the Filter by Color, select Filter by Cell Color. Remember, here the default color is taken, if you want to take a different color then choose that cell color. And then press OK.

Filter-by-color

The result will look like this. The duplicate values are highlighted in Column A because the filter is applied to Column A and if you want to highlight the duplicate values from column B, then apply the filter in Column B.

Filtered-view

Step 5: Select the cells from Column A that are colored and right-click, a dialogue box will appear(as shown below) and from the dialogue box select Clear Contents

Delete-Duplicate

All the duplicate contents will be deleted.


Next Article

Similar Reads