"Eliminate Duplicates in Excel: Highlight & Remove Duplicates in Two Columns"

Are you working with Excel and struggling to identify and highlight duplicate values across two columns? You're not alone. Duplicates can cause inconsistencies and errors in your data, making it crucial to identify and remove them. In this guide, we'll walk you through a simple yet powerful method to highlight duplicates in two columns using Excel's Conditional Formatting feature.

Understanding Conditional Formatting

Conditional Formatting is a feature in Excel that allows you to apply formatting to cells based on their values. It's an incredibly useful tool for data analysis and visualization. In our case, we'll use it to highlight cells that contain duplicate values in two columns.

Preparing Your Data

Before we start, ensure your data is structured correctly. For this method, you need two columns of data side by side. Let's say your data looks like this:

How to mark or highlight unique or duplicate values in excel
How to mark or highlight unique or duplicate values in excel

Column A Column B
Apple Red
Banana Yellow
Apple Green
Cherry Red

In this example, "Apple" and "Red" are duplicates that we want to highlight.

Highlighting Duplicates in Two Columns

Now, let's use Conditional Formatting to highlight these duplicates:

  1. Select the range of cells you want to check for duplicates. In our case, this is A1:B5.
  2. Click on the "Home" tab in the Excel ribbon, then click on "Conditional Formatting" in the "Styles" group.
  3. From the dropdown menu, select "New Rule..."
  4. In the "New Formatting Rule" dialog box, select "Use a formula to determine which cells to format".
  5. In the "Format values where this formula is true:" box, enter the following formula: =COUNTIF($A$1:$A1, $A1) * COUNTIF($B$1:$B1, $B1) > 1
  6. Choose the formatting you want to apply (like filling the cells with a color).
  7. Click "OK" to close the dialog boxes.

The formula we used works by counting the number of times the value in the current cell appears in both columns. If this count is greater than 1, the cell is formatted (highlighted).

Find Duplicates in Excel
Find Duplicates in Excel

Adjusting the Formula for Larger Data Sets

If you're working with a larger data set, you'll need to adjust the formula to reference the entire range of cells. For example, if your data is in A1:B1000, the formula would be: =COUNTIF($A$1:$A1000, $A1) * COUNTIF($B$1:$B1000, $B1) > 1

Removing Duplicates

Once you've highlighted the duplicates, you can choose to remove them. Select the range of cells, click on the "Home" tab, then "Remove Duplicates" in the "Editing" group. Excel will remove the duplicates, leaving only the first occurrence of each pair.

And that's it! You've now learned how to highlight and remove duplicates in two columns using Excel's Conditional Formatting feature. This method is powerful, flexible, and easy to use, making it a valuable tool in your data analysis toolkit.

How to highlight active row and column in Excel
How to highlight active row and column in Excel
How to compare two columns for (highlighting) missing values in Excel?
How to compare two columns for (highlighting) missing values in Excel?
Highlight matches and differences between 2 columns in Excel !
Highlight matches and differences between 2 columns in Excel !
How to Combine Two Columns in Microsoft Excel
How to Combine Two Columns in Microsoft Excel
HOW TO COMPARE TWO COLUMNS IN EXCEL
HOW TO COMPARE TWO COLUMNS IN EXCEL
How to Highlight a Column in Excel? [Window 10 & 11 Guide] - MiniTool Partition Wizard
How to Highlight a Column in Excel? [Window 10 & 11 Guide] - MiniTool Partition Wizard
How to Highlight Active Row Column in Excel
How to Highlight Active Row Column in Excel
Highlight EVERY Other ROW in Excel (using Conditional Formatting)
Highlight EVERY Other ROW in Excel (using Conditional Formatting)
How to highlight your rows in excel
How to highlight your rows in excel
How to Highlight Every Other Row in Excel - Best Excel Tutorial
How to Highlight Every Other Row in Excel - Best Excel Tutorial
How to highlight cell if value exists in or equals to cell in another column in Excel?
How to highlight cell if value exists in or equals to cell in another column in Excel?
How to Match Two Columns and Return a Third in Excel - ExcelDemy
How to Match Two Columns and Return a Third in Excel - ExcelDemy
How to Highlight Auto the Active Row and Column in a Data Range |  Excel Tips and Tricks #11
How to Highlight Auto the Active Row and Column in a Data Range | Excel Tips and Tricks #11
How to Match Multiple Columns in Excel (Easiest 5 ways)
How to Match Multiple Columns in Excel (Easiest 5 ways)
an excel chart with the text highlight active row
an excel chart with the text highlight active row
Easy Methods to Compare Columns in Excel
Easy Methods to Compare Columns in Excel
How to highlight certain rows in your data.
How to highlight certain rows in your data.
calculate gst in excel, how to calculate gst, gst calculator, gst calculator in excel
calculate gst in excel, how to calculate gst, gst calculator, gst calculator in excel
How to keep column header viewing when scrolling in Excel?
How to keep column header viewing when scrolling in Excel?
Find Duplicates in Excel
Find Duplicates in Excel
How to conditionally format or highlight first occurrences (all unique values) in Excel?
How to conditionally format or highlight first occurrences (all unique values) in Excel?
How to highlight row if cell contains text/value/blank in Excel?
How to highlight row if cell contains text/value/blank in Excel?
How to Create Diagonal Header in Excel
How to Create Diagonal Header in Excel