+ Reply to Thread
Results 1 to 7 of 7

removing duplicates and oldest date

  1. #1
    Registered User
    Join Date
    07-06-2016
    Location
    London, England
    MS-Off Ver
    2013
    Posts
    19

    Cool removing duplicates and oldest date

    Hello,

    What I am trying to do is use a VBA code to remove duplicates of a column of data as well as the oldest date. See the pictures below.

    dates 1.PNG

    The picture above shows a column of dates, they are not necessarily in any order but in this case they happen to be. In a different sheet, I want the duplicates removed and the oldest date. The picture below shows the desired result, with this result preferably being in date order and the date values of "31 March 2016" being removed completely because that is the oldest date.

    dates 2.PNG

    On top of this, I am trying to have the code so that if more dates get added to the first list, they will automatically be added to the results column if I run the code.

    I'm sorry if this is complicated because it's quite specific, but I don't know how to do it so any help would be great

    Thanks
    Last edited by chubbster31; 07-14-2016 at 10:05 AM.

  2. #2
    Forum Contributor kalbasiatka's Avatar
    Join Date
    02-27-2016
    Location
    Brest, Belarus
    MS-Off Ver
    2021
    Posts
    224

    Re: removing duplicates and oldest date

    Please Login or Register  to view this content.
    To do it for me and help me it is 2 different things!
    Sorry for my english, blame Google translator

  3. #3
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: removing duplicates and oldest date

    If data in column A this will put your output in column B

    Please Login or Register  to view this content.
    If you are happy with my response please click the * in the lower left of my post.

  4. #4
    Registered User
    Join Date
    07-06-2016
    Location
    London, England
    MS-Off Ver
    2013
    Posts
    19

    Re: removing duplicates and oldest date

    thank you

    at the moment it deletes the most recent date. How can I alter the code to get it to delete the oldest date?

  5. #5
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,834

    Re: removing duplicates and oldest date

    Alter a1 to suite
    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    07-06-2016
    Location
    London, England
    MS-Off Ver
    2013
    Posts
    19

    Re: removing duplicates and oldest date

    Thank you, that worked great

  7. #7
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,834

    Re: removing duplicates and oldest date

    You are welcome and thanks for the feedback.

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

+ 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. Removing duplicates based on priority and date
    By booztarsd in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-13-2015, 09:48 AM
  2. Find duplicates and return most recent
    By FranktheBank in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 03-12-2014, 02:39 PM
  3. Removing duplicates from a list based on the latest date
    By Krys14 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-06-2014, 10:05 AM
  4. Removing duplicates based on date criteria?
    By Z74 in forum Excel General
    Replies: 1
    Last Post: 07-15-2013, 05:24 AM
  5. Removing Duplicates in Excel - based on most recent data?
    By Womble1986 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-27-2012, 10:24 PM
  6. Replies: 6
    Last Post: 03-29-2012, 12:16 AM
  7. removing oldest duplicates by date
    By zkcelltest in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 02-29-2008, 02:34 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