+ Reply to Thread
Results 1 to 4 of 4

Porblem displaying next 2 dates

  1. #1
    Forum Contributor
    Join Date
    04-02-2010
    Location
    penrith
    MS-Off Ver
    Excel 2007
    Posts
    522

    Porblem displaying next 2 dates

    Hi I have a problem trying to display dates from a range that also includes text, I need a formula to display the current soonest and then next soonest dates and display them.

    The soonest date must also be displayed if is equal to todays date.

    Please see attached sheet.

    Many thanks

    JD
    Attached Files Attached Files

  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,724

    Re: Porblem displaying next 2 dates

    In your sample file I inserted some blank columns to move your dates over so that they started in column J (only goes to column S, though), then you can use this formula in B5:

    =IF(ISNUMBER(MATCH(TODAY(),J5:T5,0)),INDEX(J5:T5,MATCH(TODAY(),J5:T5,0)),INDEX(J5:T5,MATCH(TODAY(),J5:T5)+1))

    and this one in C5:

    =IF(ISNUMBER(MATCH(TODAY(),J5:T5,0)),INDEX(J5:T5,MATCH(TODAY(),J5:T5,0)+1),INDEX(J5:T5,MATCH(TODAY(),J5:T5)+2))

    Then you can copy the two formulae into B11:C11 and into B18:C18 to give you the results you indicate.

    Hope this helps.

    Pete

  3. #3
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,193

    Re: Porblem displaying next 2 dates

    For "current Appt"

    =MIN(IF($F5:$O5<>"Finished",IF($F5:$O5>=TODAY(),$F5:$O5,"")))

    Enter with Ctrl+Shift+Enter

    for "Next Appt"

    =INDEX($F5:$O5,MATCH($B5,$F5:$O5,0)+1)

  4. #4
    Forum Contributor
    Join Date
    04-02-2010
    Location
    penrith
    MS-Off Ver
    Excel 2007
    Posts
    522

    Re: Porblem displaying next 2 dates

    Pete, superb as always, cheers mate .

+ 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] Porblem using LOOKUP and empty cells
    By Lehoi in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 01-30-2016, 05:46 PM
  2. [SOLVED] porblem with time calculation over days
    By Dj Duck in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 01-24-2016, 08:35 PM
  3. Displaying subset of dates from a range of dates
    By DDE12 in forum Excel Formulas & Functions
    Replies: 17
    Last Post: 10-06-2015, 06:30 PM
  4. Calculating Porblem during Autofilter mode.
    By weeeee0713 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-12-2014, 02:32 AM
  5. Porblem Emailing Exce templates
    By chexcel in forum Excel General
    Replies: 5
    Last Post: 09-05-2013, 11:53 AM
  6. Replies: 2
    Last Post: 02-05-2013, 04:52 AM
  7. Latitude/Longitude Porblem
    By edwardtong694 in forum Excel General
    Replies: 3
    Last Post: 05-20-2009, 12:23 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