## 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 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:

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:

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

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.

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.

#### 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.

 with more than 300 handy functions, makes your jobs more easier. Free Downloadfree full-featured in 30 days

After Kutools for Excel, please do as below:

1. Select the two ranges that you want to compare by holding Ctrl key, then click Kutools > Select > Select Same & Different Cells. See screenshot:

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:

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

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

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.

You may be interested in these articles:

### Best Office Productivity Tools

 🤖 Kutools AI Aide: Revolutionize data analysis based on: Intelligent Execution   |  Generate Code  |  Create Custom Formulas  |  Analyze Data and Generate Charts  |  Invoke Kutools Functions… Popular Features: Find, Highlight or Identify Duplicates   |  Delete Blank Rows   |  Combine Columns or Cells without Losing Data   |   Round without Formula ... Super Lookup: Multiple Criteria VLookup  |   Multiple Value VLookup  |   VLookup Across Multiple Sheets   |   Fuzzy Lookup .... Advanced Drop-down List: Quickly Create Drop Down List   |  Dependent Drop Down List   |  Multi-select Drop Down List .... Column Manager: Add a Specific Number of Columns  |  Move Columns  |  Toggle Visibility Status of Hidden Columns  |  Compare Ranges & Columns ... Featured Features: Grid Focus   |  Design View   |   Big Formula Bar   |  Workbook & Sheet Manager   |  Resource Library (Auto Text)   |  Date Picker   |  Combine Worksheets   |  Encrypt/Decrypt Cells   |  Send Emails by List   |  Super Filter   |   Special Filter (filter bold/italic/strikethrough...) ... Top 15 Toolsets:  12 Text Tools (Add Text, Remove Characters, ...)   |   50+ Chart Types (Gantt Chart, ...)   |   40+ Practical Formulas (Calculate age based on birthday, ...)   |   19 Insertion Tools (Insert QR Code, Insert Picture from Path, ...)   |   12 Conversion Tools (Numbers to Words, Currency Conversion, ...)   |   7 Merge & Split Tools (Advanced Combine Rows, Split Cells, ...)   |   ... and more

Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time.  Click Here to Get The Feature You Need The Most...

#### Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier

• Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
• Open and create multiple documents in new tabs of the same window, rather than in new windows.
• Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
This is not working for numerical columns
This comment was minimized by the moderator on the site
Both of above methods work for numeric columns
This comment was minimized by the moderator on the site
I tried but it gives an error :( But thanx
This comment was minimized by the moderator on the site
Hi, if the formula get error, you can check if the reference is wrong, or you can try the second method above.
There are no comments posted here yet