HomeHow ToHow to Compare Two Columns for Duplicate or Unique Excel Data

How to Compare Two Columns for Duplicate or Unique Excel Data

Author

Updated On

Reading Time

Not all the time we can perfectly input data on Microsoft Excel without errors. There are also instances when we add duplicate values on cells that should not be there. However, we may tend to overlook them, especially if we are dealing with a lot of columns and data in our worksheets.

Microsoft Excel can help you minimize errors and find duplicate values on your spreadsheet columns. You can compare two columns at the same time to highlight and check the values for differences and matches.

Methods-to-Delete-Unwanted-Trailing-or-Leading-Spaces-in-Microsoft-Excel-Worksheet-Cells
Image credit: Microsoft

Ways to Compare Two Microsoft Excel Columns for Duplicate/Unique Data

There are several methods and ways you can use to find matches and locate unique or duplicate data on your Microsoft Excel columns. You can check them below and find the format which is more suitable for you.

Method #1 – Create a New Formatting Rule

  • Open the Excel sheet where you want to compare two columns.
  • Click the Column Header of the first column to highlight all cells.
  • On the main menu, go to the Home tab.
  • Navigate to Conditional Formatting on the right side.
  • Select New Rule.
  • Under Rule Type, click Use a formula to determine which cells to format.
  • Scroll down to Format values where this formula is true.
  • Enter the following formula: =countif($B:$B, $A1), whereas A is the first column and B is the second column.
  • Click the Format button.
  • Next, format the duplicate cell.
  • Click OK.

Method #2 – Highlight Duplicate/Unique Values

  • On your Microsoft Excel sheet, highlight the cells or columns that you want to compare.
  • Go to the Home tab on the main menu.
  • Select Conditional Formatting.
  • Choose Highlight Cells Rules.
  • Click Duplicate Values.
  • Under Format cells, select Duplicate.
  • Next, choose the formatting that you want to highlight the duplicate cells beside values with.
  • Click OK.
  • If you want to highlight the unique data instead, Navigate to the Conditional Formatting.
  • Click Highlight Cells Rules.
  • Go to Duplicate Values.
  • Under Format cells, select Unique.
  • Set the formatting for the unique cells.
  • Click OK.

Method #3 – Enter a Formula

  • Insert a new column in between the two columns that you want to compare.
  • Enter the following formula: =IF(ISERROR(MATCH(A2,$C$2:$C$7,0)),”Not Duplicate”,”Duplicate”), whereas A is the first column and C is the second column, number 2 is the start of the column cell, and 7 is the last cell.
  • To remove the duplicate cells, highlight all the cells.
  • Go to the Data tab on the main menu.
  • Navigate to Sort & Filter.
  • Select Filter.
  • Check the box next to Duplicate.
  • Click OK.

That’s it! You have three options to identify and filter duplicate values to find matches and differences in your Microsoft Excel sheets data. Which method do you find the easiest? You can share your thoughts with us below.

READ MORE ON:

Windows Dispatch is a website supported by its readers & community. Some pages may contain affiliate links which may allow us to earn a little money when you buy through them.

Aileen G. M.
Aileen G. M.
A technology writer with a degree in Business Administration majoring in Marketing. Aileen loves creating helpful but simple guides for troubleshooting and fixing complex issues on today's gadgets and services.

Further Readings

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Recent Articles

Trending