Tip: Other languages are Google-Translated. You can visit the English version of this link.
Log in


How to compare two columns and delete matches in Excel?

If you have two columns/lists including some duplicates, now you want to compare them and find out the matches, the delete them, how can you quickly solve? In this article, I introduce different ways to help you handle it in Excel.

Compare two columns and delete matches with formula

Compare two columns and delete matches with Kutools for Excel good idea3

Select Duplicate & Unique Cells (quickly select duplicate or unique values in a column.

doc select unique duplicate value

Compare two columns and delete matches with formula

In Excel, I introduce formulas to help you find out the match ones.

1. Select a blank cell next to the first column you want to compare (Name1), here I select B1, and type this formula =IF(ISERROR(MATCH(A1,$C$1:$C$10000,0)),"Unique","Duplicate"), and press Enter key, and drag the autofill handle down to fill this formula to the cells. See screenshot:

doc compare delete match 1
doc compare delete match 2

Note: in the formula, A1 is the first cell of your first column which you need to compare and C1:C10000 is the column you want to compare with.

2. Then select the formula columns, and click Data > Filter. See screenshot:

doc compare delete match 3

3. Click at the arrow in the first cell of helper column, and check Duplicate only from the drop down list. See screenshot:

doc compare delete match 4

4. Click OK. Now only the duplicates are visible, select them in the Name1 column, and press Delete key in the keyboard to delete them.

doc compare delete match 5
doc arrow down
doc compare delete match 6

5. Click Data > Filter again to remove the filter, and then remove the formulas if you do not need it any more.

Now all the matches of two compared columns are deleted.

doc compare delete match 7

Compare two columns and delete matches with Kutools for Excel

With above method is somewhat troublesome, and you can use Kutools for Excel’s Compare Ranges function to quickly select the matches in two columns and then delete them.

Kutools for Excel, with more than 120 handy Excel functions, enhance your working efficiency and save your working time.

After free installing Kutools for Excel, please do as below:

1. Click Kutools > Select > Select Same & Different Cells. See screenshot:

doc compare delete match 14

2. In the Select Same & Different Cells dialog, Check My Data has headers if your selection contians headers (the selected headers must be same if you check this option), and the check Each row  and Same Values option. See screenshot:

doc compare delete match 15

3. Click Ok, a dialog pops out to tell you the number of selected cells.

doc compare delete match 16

4. Click OK to close the dialogs, and the match ones in first column are selected, and press Delete key to delete them.

doc compare delete match 17

If you want to highlight the same values between two columns, you can check Fill backcolor or Fill font color option and select a color you want from the list.
doc compare delete match 18

You may be interested in these articles:

Excel Productivity Tools

Ribbon of Excel (with Kutools for Excel installed)

300+ Advanced Features Increase Your Productivity by 70%, and Help You To Stand Out From Crowd!

Would you like to complete your daily work quickly and perfectly? Kutools For Excel brings 300+ cool and powerful advanced features (Combine workbooks, sum by color, split cell contents, convert date, and so on...) for 1500+ work scenarios, helps you solve 80% Excel problems.

  •  Deal with all complicated tasks in seconds, help to enhance your work ability, get success from the fierce competition, and never worry about being fired.
  •  Save a lot of work time, leave much time for you to love and care the family and enjoy a comfortable life now.
  •  Reduce thousands of keyboard and mouse clicks every day, relieve your tired eyes and hands, and give you a healthy body.
  •  Become an Excel expert in 3 minutes, and get admiring glance from your colleagues or friends.
  •  No longer need to remember any painful formulas and VBA codes, have a relaxing and pleasant mind, give you a thrill you've never had before.
  •  Spend only $39, but worth than $4000 training of others. Being used by 110,000 elites and 300+ well-known companies.
  •  60-day unlimited free trial. 60-day money back guarantee. Free upgrade and support for 2 years. Buy once, use forever.
  •  Change the way you work now, and give you a better life immediately!

Office Tab Brings Efficient And Handy Tabs to Office (include Excel), Just Like Chrome, Firefox, And New IE

  • Increases your productivity by 50% when viewing and editing multiple documents.
  • Reduce hundreds of mouse clicks for you every day, say goodbye to mouse hand.
  • Open and create documents in new tabs of same window, rather than in new windows.
  • Help you work faster and easily stand out from the crowd! One second to switch between dozens of open documents!
Say something here...
symbols left.
You are guest ( Sign Up? )
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.

Be the first to comment.