+ Reply to Thread
Results 1 to 5 of 5

Delete Duplicate entry and retain the one with the latest date

  1. #1
    Registered User
    Join Date
    02-25-2019
    Location
    Philippines
    MS-Off Ver
    Excel 2010
    Posts
    5

    Delete Duplicate entry and retain the one with the latest date

    Hello,

    What could be the possible formula that would delete the duplicate addresses but retain the latest one?
    For this example, I need to keep the one with 09/12/2010 date.

    Address City State Zip Date
    13th Floor ATLANTA GA 30303 31/12/1979
    13th Floor ATLANTA GA 30303 31/03/1981
    13th Floor ATLANTA GA 30303 30/03/2000
    13th Floor ATLANTA GA 30303 20/02/2004
    13th Floor ATLANTA GA 30303 09/12/2010

    Many thanks in advance,

  2. #2
    Registered User
    Join Date
    02-25-2019
    Location
    Philippines
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Delete Duplicate entry and retain the one with the latest date

    Attached a sample workbook.

    Thanks again
    Attached Files Attached Files

  3. #3
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,569

    Re: Delete Duplicate entry and retain the one with the latest date

    I have a feeling that there is more to this, however to simply retain the record having the most recent date:
    1. Find the most recent date using (cell L2): =AGGREGATE(14,6,E$2:E$6,1)
    2. Display the corresponding records (Cells H2:K2): =INDEX(A$2:A$6,MATCH($L2,$E$2:$E$6,0))
    Let us know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  4. #4
    Registered User
    Join Date
    02-25-2019
    Location
    Philippines
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Delete Duplicate entry and retain the one with the latest date

    Hi JeteMc,

    I should have put more sample data on my worksheet. Sorry my fault.
    I tried working on the sample formula you shared but I still couldn't make it work.
    So here I attached a workable sample.

    Thanks in advance,

  5. #5
    Forum Expert
    Join Date
    10-15-2018
    Location
    MA, USA
    MS-Off Ver
    2010, 2019
    Posts
    1,616

    Re: Delete Duplicate entry and retain the one with the latest date

    Here is a possible solution. It does need a helper column though.

    In G2 (the helper column):
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    This is an array formula and must be committed via CTRL-SHIFT-Enter. Copy down col-F as far as is needed. The formula extracts distinct values for each of the address fields in the form of a row index and in particular where there are duplicates it chooses the most recent entry (I assume the input list is in chronological order).

    In I2 copied across and down to M10:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    This formula indexes into the address columns using the helper column index.

    I added a couple more test cases to your data. See the attached workbook.

    I'm sure there's a no-helper-column solution out there but at least let us know whether this is the result you are looking for.
    Geoff

    Did I help significantly? If you wish, click on * Add Reputation to say thanks.
    If your problem has been resolved please select ?Solved? from the Thread Tools menu

+ 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. [SOLVED] Delete Duplicate Rows but retain the Row which meets the criteria using VBA
    By zaska in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-28-2020, 02:11 AM
  2. Replies: 3
    Last Post: 01-25-2020, 05:52 PM
  3. Replies: 2
    Last Post: 01-25-2020, 04:49 PM
  4. Replies: 7
    Last Post: 11-16-2014, 06:47 AM
  5. [SOLVED] compare duplicate and retain only latest one
    By nigel1 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-03-2014, 04:46 AM
  6. Delete duplicate rows, but keep the cell that has the latest date
    By vaznlyfe in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-20-2012, 01:35 PM
  7. Delete duplicate rows and retain only one
    By canada123 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-04-2010, 07:40 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