+ Reply to Thread
Results 1 to 10 of 10

Unique records

  1. #1
    Registered User
    Join Date
    08-14-2014
    Location
    Saskatoon
    MS-Off Ver
    2010
    Posts
    37

    Unique records

    Hi,

    I'm looking for the most efficient way to find duplicate records and delete BOTH occurrences of the records.

    We typically sort the left table and then match it the right table (yellow) and delete row by row.

    Takes about half hour to complete.

    There MUST be an easier way.

    Book1.xlsx

  2. #2
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Unique records

    So the record needs to be the same for all 4 columns (J,K,L,M) Can we not worry about discrepancies in Pay and Hours and focus on Date and Employee number?
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Registered User
    Join Date
    08-14-2014
    Location
    Saskatoon
    MS-Off Ver
    2010
    Posts
    37

    Re: Unique records

    Yes, records need to be identical in all 4 columns.

  4. #4
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,152

    Re: Unique records

    What fields constitute a duplicate?

  5. #5
    Registered User
    Join Date
    08-14-2014
    Location
    Saskatoon
    MS-Off Ver
    2010
    Posts
    37

    Re: Unique records

    A,C,E,G need to match J, K, L, M

  6. #6
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Unique records

    Here's how I would do it.
    I am going to assume in real life, the two tables are not next to each other. Is this true?

    To the right of each table, concatenate Emp Number and WorkDate
    H2=A2&G2
    O2=K2&N2

    Then in the next column i.e. in I2 copied down
    =ISNUMBEr(MATCH(H2, O:O,0))
    Do the same for the second table

    You could now filter on TRUE and delete those rows. HOWEVER, that would change the TRUE/FALSE values immediately on the second table. So what we need to do first is make those TRUE/FALSES permanent
    Copy (col I for example) , Paste Special > Values. Do the same for Column P. Now you can filter and erase rows.
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    08-14-2014
    Location
    Saskatoon
    MS-Off Ver
    2010
    Posts
    37

    Re: Unique records

    the yellow table IS copy and pasted from the previous pay period next the current one. my attahment is exactly what it looks like right before I sort the left table.

  8. #8
    Valued Forum Contributor
    Join Date
    09-17-2012
    Location
    Johannesburg, South Africa
    MS-Off Ver
    Excel 2007
    Posts
    454

    Re: Unique records

    I hope I understood your requirement: If any records match BETWEEN tables, the matching records should be deleted from both tables?

    If so, then this solution identifies the records that should be deleted.

    unique_records.xlsx

  9. #9
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Unique records

    You can follow my process just
    H2= A2&C2&E2&G2
    O2= K2&L2&M2&N2

    And when you delete, make sure you don't delete the whole row (i.e. other table)

  10. #10
    Registered User
    Join Date
    08-14-2014
    Location
    Saskatoon
    MS-Off Ver
    2010
    Posts
    37

    Re: Unique records

    Thanks all. I will test it out this afternoon.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 5
    Last Post: 04-30-2013, 07:42 PM
  2. [SOLVED] Comparing records to result in a list of unique records
    By greenmat in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-17-2013, 07:45 PM
  3. Unique values and Unique Records
    By rjbautista20 in forum Access Programming / VBA / Macros
    Replies: 1
    Last Post: 04-25-2012, 05:12 AM
  4. Get unique records
    By Ganesh7299 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 11-03-2011, 03:25 PM
  5. Filter unique records only: Want the last records, not the first
    By davelarue in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-11-2009, 08:51 AM
  6. unique filter results in some non-unique records.
    By Serials Librarian in forum Excel General
    Replies: 2
    Last Post: 05-26-2006, 05:10 PM
  7. [SOLVED] Unique Records
    By Happy in forum Excel General
    Replies: 9
    Last Post: 07-27-2005, 10:05 AM
  8. [SOLVED] Unique records
    By Pete in forum Excel General
    Replies: 1
    Last Post: 07-26-2005, 02:05 PM

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