+ Reply to Thread
Results 1 to 3 of 3

how to remove duplicates with the earliest date ?

  1. #1
    Registered User
    Join Date
    12-11-2013
    Location
    cape town
    MS-Off Ver
    Excel 2013
    Posts
    3

    how to remove duplicates with the earliest date ?

    Hi guys,

    Can someone please help me solve this issue...
    remove duplicate.PNG

    is there a way to remove the duplicates in column ICAP ID...
    but only remove the icap id that has the earliest completed date(completion_dt).

    I attached an example excell...

    thanks guys any help would be great..
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    09-07-2006
    Posts
    520

    Re: how to remove duplicates with the earliest date ?

    One way ..
    Insert 2 new cols A and B
    (ICAP ID is now col C, completion_dt = col G)

    Put in B2, array enter (press CTRL+SHIFT+ENTER to confirm the formula):
    =MIN(IF($C$2:$C$100=C2,$G$2:$G$100))
    Copy down. Modify the $100 bit to suit the extent of your data
    This col extracts the earliest completion date for each ICAP ID

    Put in A2:
    =IF(C2="","",IF(SUMPRODUCT((C$2:C2=C2)*(B$2:B2=B2))>1,"x",""))
    Copy down to the last row of data, this will flag dups as x based on your dual criteria
    Filter on col A for x, delete these filtered rows, remove filter, delete away cols A and B > you're done !
    --------------------------------------
    voila? Wave it, click the little star at the bottom left of my responses
    Last edited by Max, Singapore; 02-14-2014 at 09:59 PM.

  3. #3
    Forum Expert Tinbendr's Avatar
    Join Date
    06-26-2012
    Location
    USA
    MS-Off Ver
    Office 2010
    Posts
    2,125

    Re: how to remove duplicates with the earliest date ?

    Sort by ICAP_ID, Completion date, then use the built in duplicate remover. Excel only keeps the top unique record in the list.
    David
    (*) Reputation points appreciated.

+ 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] VBA to remove duplicates as per the date
    By harry_1805 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-19-2013, 01:20 AM
  2. [SOLVED] Macro to find the earliest date and remove all the other rows.
    By gokzee in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 12-05-2012, 05:12 AM
  3. Remove duplicates but keep the one with latest date
    By nee2m in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-21-2012, 10:09 AM
  4. Getting rid of duplicates with the earliest dates
    By sabbur in forum Excel General
    Replies: 1
    Last Post: 05-09-2012, 12:27 AM
  5. Pivot Automation: Remove earliest date and add 1 date (Rows)
    By 4am in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-03-2011, 04:50 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