+ Reply to Thread
Results 1 to 10 of 10

Excel help - keeping two latest dates per id

  1. #1
    Registered User
    Join Date
    01-19-2022
    Location
    UK
    MS-Off Ver
    365 MSO
    Posts
    21

    Excel help - keeping two latest dates per id

    Hi

    I needed some help with an Excel task - I have a column of numerous IDs, each ID has duplicates due to different dates and I want to keep the two latest dates for each ID (see attachment) - how do I achieve this ?

    Look forward to responses

    sgkt
    Attached Files Attached Files
    Last edited by gks_19; 01-20-2022 at 06:16 AM.

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,728

    Re: Excel help - keeping two latest dates per id

    It would help if you attached a sample Excel workbook - see the yellow banner at the top of the screen for details of how to do this.

    Pete

  3. #3
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,830

    Re: Excel help - keeping two latest dates per id

    Administrative Note:

    Members will tailor the solutions they offer to the version of Office (Excel) that you have. Please check that your forum profile is up-to-date in this respect. 3112 is not a recognised version. If you aren't sure, in Excel go to File | Account and report what it says below the MS logo at the top of that page. If your version is for Mac, please also state this. Thanks.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  4. #4
    Registered User
    Join Date
    01-19-2022
    Location
    UK
    MS-Off Ver
    365 MSO
    Posts
    21

    Re: Excel help - keeping two latest dates per id

    I've uploaded an example

    Thanks
    Attached Files Attached Files

  5. #5
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: Excel help - keeping two latest dates per id

    =UNIQUE(A2:A17)

    and

    =AGGREGATE(14,6,$B$2:$B$17/($A$2:$A$17=D3),{1,2})
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  6. #6
    Registered User
    Join Date
    01-19-2022
    Location
    UK
    MS-Off Ver
    365 MSO
    Posts
    21

    Re: Excel help - keeping two latest dates per id

    Hi Glen

    Thanks for this - is there a way to keep the two latest dates in the rows as opposed to having both dates next to each other in another columns.

    Alternatively, is there a way to delete id duplicates but leave the two latest dates (which should preserve the format of how the dates remain in the rows) ?

  7. #7
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: Excel help - keeping two latest dates per id

    I'm sure it is... but can you SHOW me exactly the layout you want (Excel sheet) ??

  8. #8
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: Excel help - keeping two latest dates per id

    A bit of a guess...
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    01-19-2022
    Location
    UK
    MS-Off Ver
    365 MSO
    Posts
    21

    Re: Excel help - keeping two latest dates per id

    Spot on - thank you !

  10. #10
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: Excel help - keeping two latest dates per id

    You're welcome.



    It would be very nice if you were to just click the Add Reputation button at the foot of any of the posts of members who helped you reach a solution.

    Finally, if that takes care of your original question, please select "Thread Tools" from the menu link (just above the first post in the thread) 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. Replies: 7
    Last Post: 12-27-2017, 09:57 AM
  2. keeping dates and times an excel column when removing all formatting
    By Sossity in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-21-2017, 07:10 AM
  3. [SOLVED] Formula to return the 'earliest' and 'latest' dates from a list of dates is not working
    By Hawkmoth1 in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 03-21-2017, 07:14 AM
  4. [SOLVED] Return the earliest and latest dates selected from a list of dates.
    By Hawkmoth1 in forum Excel Formulas & Functions
    Replies: 20
    Last Post: 02-01-2017, 09:41 AM
  5. Replies: 7
    Last Post: 05-02-2013, 09:50 PM
  6. Replies: 2
    Last Post: 07-10-2012, 02:10 AM
  7. [SOLVED] I know Excel can help me with keeping track of due dates
    By pamiam3333 in forum Excel General
    Replies: 1
    Last Post: 03-07-2006, 01:17 AM

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