+ Reply to Thread
Results 1 to 12 of 12

Deleting Duplicates!!

  1. #1
    Registered User
    Join Date
    10-01-2012
    Location
    LA
    MS-Off Ver
    Excel 2010
    Posts
    14

    Deleting Duplicates!!

    Hi,

    I am new to these forums and I hope someone can help me with my excel issues. Here is what I am basically trying to do with excel 2010.
    I have 30,000 records with employee id column A, last name column B, first name column C, and Card code in column D. I want to compare duplicate records which match all 4 columns and if there is a match delete those two rows.

    So if ROW X of column A AND column B AND column C AND column D Match Row Y of column A AND column B AND column C AND column D, delete the record. All i want is that if two records match with all of those rules then delete both matches in the rows.

    Thanks again hopefully someone can help!

    Mel

  2. #2
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Deleting Duplicates!!

    -- Select your entire range of data
    -- On the Data tab -- Remove duplicates
    Life's a spreadsheet, Excel!
    Say thanks, Click *

  3. #3
    Registered User
    Join Date
    10-01-2012
    Location
    LA
    MS-Off Ver
    Excel 2010
    Posts
    14

    Re: Deleting Duplicates!!

    Hey Ace,

    I already tried that, it only deletes one of the duplicates not BOTH. Any other thoughts?

  4. #4
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Deleting Duplicates!!

    Oops didnt read the post correctly..

    Perhaps use a helper column

    In Row 2 use
    =COUNTIFS(A:A,A2,B:B,B2,C:C,C2,D:D,D2)>1

    and drag down

    Filter on TRUE and delete rows

  5. #5
    Registered User
    Join Date
    10-01-2012
    Location
    LA
    MS-Off Ver
    Excel 2010
    Posts
    14

    Re: Deleting Duplicates!!

    Hey Ace,

    I don't want to sound stupid, but I am really new to excel. Please clarify what I am suppose to do with this "=COUNTIFS(A:A,A2,B:B,B2,C:C,C2,D:D,D2)>1". I didn't really understand what you meant by use it on row 2 and mark it as true. Do I just copy and paste that under any row2 and then drag it down? Then do I highlight all four columns and delete duplicates?

    Sorry for the ignorance!

  6. #6
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Deleting Duplicates!!

    See if this helps..

    Column E is the one that needs to be filtered on and has the formula. All values with TRUE in Col E are dupliactes and can be deleted
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    10-01-2012
    Location
    LA
    MS-Off Ver
    Excel 2010
    Posts
    14

    Re: Deleting Duplicates!!

    I tried the formula and unfortunatley it shows false for everything. I uploaded a sample from the large file I have to show you what I'm trying to do.

    As you can see line 2 and 3 have the same information, I want something to compare the two rows and if its the same value delete it. If I run the duplicate remover from excel it will still leave a copy of one of the rows.

    To give you a bigger picture here is what it should do. If you go to emp#677, the last name and first name dont match but the card code does. If we can get rid of the rest of the duplicates at the end all of my results would be the the columns that do not match and I would be able to tell which peoples names are not with the right card codes.

    Thanks
    Attached Files Attached Files

  8. #8
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Deleting Duplicates!!

    do away with the latter portion referring to column F in the formula

    ,F:F,F2

    Formula in E2 should be
    =COUNTIFS(A:A,A2,B:B,B2,C:C,C2,D:D,D2)>1
    then copy down

  9. #9
    Registered User
    Join Date
    10-01-2012
    Location
    LA
    MS-Off Ver
    Excel 2010
    Posts
    14

    Re: Deleting Duplicates!!

    Awesome now it shows true and false. So the next step is how to delete the Both Duplicates?

  10. #10
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Deleting Duplicates!!

    Filter on Column E --TRUE

    Delete all rows

  11. #11
    Registered User
    Join Date
    10-01-2012
    Location
    LA
    MS-Off Ver
    Excel 2010
    Posts
    14

    Re: Deleting Duplicates!!

    Thanks Ace u rock!

  12. #12
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,366

    Re: Deleting Duplicates!!

    @ Melkon99,

    Based on your last post it seems that you are satisfied with the solution(s) you've received but you haven't marked your thread as "SOLVED".
    For the meantime I'll do it for you.

    How?
    New quick method:
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

    Or you can use this way:

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save

    *****
    Note:
    You can also thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given.
    By doing so you can add to the reputation(s) of those who helped and shared their time in helping you.

    Regards,
    Vladimir
    I think people forget the word "THANK YOU!!!!" Do you still know it???

    There is a little star ( ADD REPUTATION ) below those person who helped you. Click it to say your "PRIVATE APPRECIATION TO THEIR EFFORT ON THEIR CONTRIBUTIONS "

    Regards,
    Vladimir

+ 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