+ Reply to Thread
Results 1 to 12 of 12

Find the next date after today's date

  1. #1
    Registered User
    Join Date
    08-29-2012
    Location
    Cambridge, England
    MS-Off Ver
    2003
    Posts
    5

    Find the next date after today's date

    Hi there,
    I have a sheet called "Bookings" where I have entries of pupils booked for driving instruction. The pupils all have an id from A1 to A5 and the ID is in column A. I want to be able to find the next booked date for a given user and paste it to a specific cell on the sheet. I can find the last booked date, but not the next one after today's date. Any help would be greatly appreciated.
    Kind regards
    Last edited by cam1859; 10-28-2012 at 08:17 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
    25,408

    Re: Find the next date after today's date

    Maybe you should post an example workbook (the FAQ describes how to). Your first post gives no indication of how your data is laid out, apart from IDs in column A.

    Pete

  3. #3
    Registered User
    Join Date
    08-28-2012
    Location
    Sri Lanka
    MS-Off Ver
    Excel 2010
    Posts
    57

    Question Re: Find the next date after today's date

    Hi Cam1859

    I agree with pete. better to have a example for the layout you wish to have.

  4. #4
    Registered User
    Join Date
    08-29-2012
    Location
    Cambridge, England
    MS-Off Ver
    2003
    Posts
    5

    Red face Re: Find the next date after today's date

    Hi,
    I have attached a sample of how the spreadsheet looks. The details in N3-P3 should reflect the next lesson for the selected pupil. Hope this is a little more helpful.
    Attached Files Attached Files

  5. #5
    Valued Forum Contributor WasWodge's Avatar
    Join Date
    08-02-2010
    Location
    Hampshire,England
    MS-Off Ver
    Office 365 and Office 2010
    Posts
    882

    Re: Find the next date after today's date

    A bit meaty so I am sure a formula expert will come up with a better solution but try in cell N3 and copied down.
    PLEASE NOTE: the formula must be entered with Ctrl-Shift-Enter

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


    Edit: Please also note that the formula only looks at the surname.
    Attached Files Attached Files
    Last edited by WasWodge; 10-28-2012 at 07:25 AM.
    If my solution worked (or not) please let me know. If your question is answered then please remember to mark it solved

    Computers are like air conditioners. They work fine until you start opening windows. ~Author Unknown

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

    Re: Find the next date after today's date

    Slightly shorter if you use the ID in column J, but same principle:

    =IF(MIN(IF(($D$4:$D$17>TODAY())*($A$4:$A$17=J3),$D$4:$D$17))=0,"",MIN(IF(($D$4:$D$17>TODAY())*($A$4:$A$17=J3),$D$4:$D$17)))

    Again, CSE to commit the formula.

    Hope this helps.

    Pete

  7. #7
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Find the next date after today's date

    See if this workbook helps

    Change the ID in J3 to see the results.
    Attached Files Attached Files
    If you need any more information, please feel free to ask.

    However,If this takes care of your needs, please select Thread Tools from menu above and set this topic to SOLVED. It helps everybody! ....

    Also
    اس کی مدد کرتا ہے اگر
    شکریہ کہنے کے لئے سٹار کلک کریں
    If you are satisfied by any members response to your problem please consider using the small Star icon bottom left of their post to show your appreciation.

  8. #8
    Valued Forum Contributor WasWodge's Avatar
    Join Date
    08-02-2010
    Location
    Hampshire,England
    MS-Off Ver
    Office 365 and Office 2010
    Posts
    882

    Re: Find the next date after today's date

    Quote Originally Posted by Pete_UK View Post
    Slightly shorter if you use the ID in column J, but same principle:

    Pete
    I obviously felt like a challenge (or need to open my eyes on a Sunday morning)

  9. #9
    Registered User
    Join Date
    08-29-2012
    Location
    Cambridge, England
    MS-Off Ver
    2003
    Posts
    5

    Re: Find the next date after today's date

    Thanks for that. It's not quite what I am looking for, but thanks so much for trying.

  10. #10
    Registered User
    Join Date
    08-29-2012
    Location
    Cambridge, England
    MS-Off Ver
    2003
    Posts
    5

    Re: Find the next date after today's date

    Marcol, that's great and resolves my problem. However, Pete's shorter code does that also. Thanks again :-)

  11. #11
    Registered User
    Join Date
    08-29-2012
    Location
    Cambridge, England
    MS-Off Ver
    2003
    Posts
    5

    Re: Find the next date after today's date

    Thanks Pete, that perfect! :-)

  12. #12
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Find the next date after today's date

    The difference is that my solution is not an array formula, on larger sheets this could be an advantage.

    Also, as it identifies the Row index, the formula can be dragged from N3 across to P3.

    Happy to of some help ...

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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