+ Reply to Thread
Results 1 to 3 of 3

Compare 2 columns and delete duplicate

  1. #1
    Registered User
    Join Date
    03-15-2013
    Location
    Goodole, USA
    MS-Off Ver
    2010
    Posts
    2

    Compare 2 columns and delete duplicate

    Hi all

    I've searched but haven't found an answer that works yet.

    I have data in column A as my master list. Column B is made up of data that exists in column A somewhere. If there a formula that will compare column B against column A and delete the row in column A if found in column B?

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,408

    Re: Compare 2 columns and delete duplicate

    A formula can't be used to delete a row - the way to achieve that is to apply a formula which identifies the rows (e.g. in column C), and then you could apply a filter to that column and delete all the rows in one operation (or, you could use a macro). Put this formula in C2 (assuming your data starts in A2 - if it doesn't, insert a new row 1 at the top of your sheet and use it for header labels):

    =IF(ISNUMBER(MATCH(A2,B:B,0)),"Delete","ok")

    Then copy this down to the bottom of your data, and then apply autofilter to column C, select "Delete" from the drop-down, select all the visible cells, then click on Delete, then select All in the filter drop-down. Save your file with a different name, so that you can still get back to the original lists if you need to.

    Hope this helps.

    Pete

  3. #3
    Registered User
    Join Date
    03-15-2013
    Location
    Goodole, USA
    MS-Off Ver
    2010
    Posts
    2

    Re: Compare 2 columns and delete duplicate

    Thanks Pete! This worked perfectly. With column A ringing in 50,000+ cells, it took a while but worked great

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1