+ Reply to Thread
Results 1 to 8 of 8

Remove Dupes except with MIN DATE

  1. #1
    Registered User
    Join Date
    01-02-2013
    Location
    NY
    MS-Off Ver
    Excel Office 365
    Posts
    49

    Remove Dupes except with MIN DATE

    COL A COL B COL C COL D DUPE?
    1 2 3 4/1 N
    2 3 3 4/1 N
    3 4 2 4/1 N
    1 2 3 4/2 Y


    Looking at the above example, how would I write a formula for column 5 (DUPE?) that looks at the first 3 columns and then, if COL D is the MIN Date, it does not consider a DUPE, but any dates after it, it is a dupe?

    I have IF(COUNTIFS(A:A, A2, B:B, B2, C:C, C2)>1,"Y","N")

    but, it is tagging the 1st one as a duplicate, also.

    Have attached sample file.

    Any idea?
    Attached Files Attached Files

  2. #2
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,613

    Re: Remove Dupes except with MIN DATE

    Try:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Also the more general shall work, but could (?) be slower in case of larger data sets
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Last edited by Kaper; 04-05-2020 at 03:31 PM.
    Best Regards,

    Kaper

  3. #3
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Remove Dupes except with MIN DATE

    @Kaper Definitely slower! Never use entire column references with an array formula!

    Since the OP gives 365 as their version, why not MINIFS?

    Regards
    Click * below if this answer helped

    Advanced Excel Techniques: http://excelxor.com/

  4. #4
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,613

    Re: Remove Dupes except with MIN DATE

    Funny to note, but in 365 version it does not to be array formula.
    As for MINIFS - indeed, I got used to older Excel versions and sometimes offer solutions back-compatible with say 2000 or 2003, even if more compact/elegant solution exists since … for instance Excel 2007
    Last edited by Kaper; 04-05-2020 at 03:43 PM.

  5. #5
    Registered User
    Join Date
    01-02-2013
    Location
    NY
    MS-Off Ver
    Excel Office 365
    Posts
    49

    Re: Remove Dupes except with MIN DATE

    This appears to work! Thank you for a quick reply. Appreciate it.

  6. #6
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Remove Dupes except with MIN DATE

    Quote Originally Posted by Kaper View Post
    Funny to note, but in 365 version it does not to be array formula.
    What? The CSE formula you gave? Of course it does! It's just pure coincidence that the non-CSE version gives correct results with the data provided. Try changing some of the entries in column D and you'll see.

    Regards

  7. #7
    Registered User
    Join Date
    01-02-2013
    Location
    NY
    MS-Off Ver
    Excel Office 365
    Posts
    49

    Re: Remove Dupes except with MIN DATE

    Just curious, how would MINIFS work with the given solution? Is there a better solution out there? Thanks
    Last edited by aetedford; 04-05-2020 at 04:14 PM.

  8. #8
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Remove Dupes except with MIN DATE

    =IF(MINIFS(D:D,A:A,A2,B:B,B2,C:C,C2)=D2,"N","Y")

    With this you can safely use entire column references, unlike with the MIN(IF array formula.

    Regards

+ 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. remove dupes from concatenated text
    By dschoenfeld in forum Excel General
    Replies: 3
    Last Post: 04-03-2013, 06:19 PM
  2. Replies: 8
    Last Post: 08-13-2012, 04:04 PM
  3. Replies: 5
    Last Post: 09-12-2011, 05:56 PM
  4. Macro to remove Dupes
    By H-Man3 in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 02-24-2011, 12:03 PM
  5. Remove dupes
    By m_789 in forum Excel General
    Replies: 0
    Last Post: 11-16-2010, 09:31 AM
  6. Excel 2007 : Remove Dupes over 10
    By kfk5012 in forum Excel General
    Replies: 2
    Last Post: 09-13-2010, 02:11 PM
  7. Remove Dupes and Collate date into one line
    By Zyphon in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 12-24-2008, 07:07 AM

Tags for this Thread

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