+ Reply to Thread
Results 1 to 12 of 12

Formula to locate earliest and latest date

  1. #1
    Forum Contributor
    Join Date
    08-19-2012
    Location
    Tacoma, Washingtonn
    MS-Off Ver
    Excel 2019
    Posts
    254

    Formula to locate earliest and latest date

    Greetings: I currently use a formula to extract the date from a series of data. The format I use is: 11-09-2019. I can successfully obtain a column of dates. I then want to identify the oldest and newest dates in that column. I have used MIN, SMALL, MAX, LARGE and all return a value of 01-00-1900. I have googled to find the answer but can't seem to locate it. Any help is appreciated. I have attached a sample workbook.
    Attached Files Attached Files
    Last edited by thedunna; 11-09-2019 at 02:37 PM.

  2. #2
    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,780

    Re: Formula to locate earliest and latest date

    As always, please provide a sample workbook - you know how.
    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.

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

    Re: Formula to locate earliest and latest date

    If you are getting a result of 01-00-1900, which is the same as zero, then the dates in your range are text values and not proper dates. If those dates are generated by a formula then you need to share the formula with us - why not attach a sample workbook? Details on how to do this are given in the yellow banner at the top of the screen.

    Hope this helps.

    Pete

  4. #4
    Forum Contributor
    Join Date
    08-19-2012
    Location
    Tacoma, Washingtonn
    MS-Off Ver
    Excel 2019
    Posts
    254

    Re: Formula to locate earliest and latest date

    I think I just did. Please let me know...

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

    Re: Formula to locate earliest and latest date

    I can see that you edited the first post at 6:30pm, but I can't see any attachment.

    Here's a longer description:

    To do this, click on Go Advanced (below the Edit Window) while you are composing a reply, then scroll down to and click on Manage Attachments and the Upload window will open. Click on Browse and navigate to (and double-click) the file icon that you want to attach, then click on Upload and then on Close this Window to return to the Edit window. When you have finished composing your post, click on Submit Post.

    Don't try to use the Paperclip icon, as it doesn't work on this forum.

    Hope this helps.

    Pete

  6. #6
    Forum Contributor
    Join Date
    08-19-2012
    Location
    Tacoma, Washingtonn
    MS-Off Ver
    Excel 2019
    Posts
    254

    Re: Formula to locate earliest and latest date

    I will do that now

  7. #7
    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,780

    Re: Formula to locate earliest and latest date

    It's there now.

  8. #8
    Forum Contributor
    Join Date
    08-19-2012
    Location
    Tacoma, Washingtonn
    MS-Off Ver
    Excel 2019
    Posts
    254

    Re: Formula to locate earliest and latest date

    It should be there now. Sorry, I forgot to upload the first time.

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

    Re: Formula to locate earliest and latest date

    You might be able to change your formula in I5 to this:

    =IF(F5="","",RIGHT(F5,11)*1)

    as the date is in a format that your regional settings will recognise as a date, although I'm not sure if the hyphens will be acceptable. A more general approach would be to change it like this:

    =IF(F5="","",DATE(RIGHT(F5,5),MID(F5,FIND(" ",F5)+3,2),MID(F5,FIND("-",F5)+1,2)))

    In either case, you need to apply the date format to that cell, then copy the formula down. Then MAX and MIN acting on these dates should return the latest and earliest dates as required.

    Hope this helps.

    Pete

  10. #10
    Forum Expert
    Join Date
    09-25-2015
    Location
    Milan Italy
    MS-Off Ver
    office 365
    Posts
    1,781

    Re: Formula to locate earliest and latest dateber

    I5=IF(F5<>"",RIGHT(F5,11)+0,"") copy down

    This formula change text in number .(date is number).Formatting column I as date




    M5=MIN(I5:I100)


    M6=MAX(I5:I100)

  11. #11
    Forum Contributor
    Join Date
    08-19-2012
    Location
    Tacoma, Washingtonn
    MS-Off Ver
    Excel 2019
    Posts
    254

    Re: Formula to locate earliest and latest date

    I was able to make that work beautifully! Thank you very, very, much!

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

    Re: Formula to locate earliest and latest date

    Not sure who that is aimed at, but glad to help.

    You might like to know that you can show your appreciation and directly thank those who have helped you by clicking on the small "star" icon located in the lower left corner of a post that you have found to be helpful (not just in this thread - for any post that has helped you). This also adds to the reputation of the poster (the small green bars in the poster's profile).

    Pete

+ 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] sorting a unique list by earliest to latest date
    By cnak in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-30-2019, 02:28 PM
  2. Replies: 3
    Last Post: 02-10-2016, 07:26 PM
  3. Replies: 1
    Last Post: 11-25-2015, 03:31 PM
  4. Replies: 2
    Last Post: 03-20-2015, 01:55 AM
  5. [SOLVED] Returning Earliest and Latest Date for a Unique ID
    By chicity26 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-26-2014, 09:39 AM
  6. Getting the earliest and latest date in Pivot Table
    By dluhut in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-02-2013, 01:54 PM
  7. identify earliest & latest date groups in table
    By Brontosaurus in forum Excel Programming / VBA / Macros
    Replies: 22
    Last Post: 07-19-2011, 04:26 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