+ Reply to Thread
Results 1 to 9 of 9

Highlight closest (future) date to today

  1. #1
    Registered User
    Join Date
    11-01-2015
    Location
    Stockholm, Sweden
    MS-Off Ver
    Office 365 Home
    Posts
    8

    Highlight closest (future) date to today

    I'm using this formula in CF: =AND($AB64>=TODAY(),COUNTIF($AB$64:$AB64,">="&TODAY())=1) which works great to highlight the closest future date. Now, I need to add another condition into the formula, but I can't seem to work it out... Column (AA) shows "Cancelled" on certain dates and I want the above formula to skip those dates and instead highlight the next value with status Confirmed. See attached file for clarification.
    Attached Files Attached Files

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

    Re: Highlight closest (future) date to today

    Try this:

    =AND($AB64>=TODAY(),COUNTIFS($AB$64:$AB64,">="&TODAY(),$AA$64:$AA64,"Confirmed")=1)
    Attached Files Attached Files
    Last edited by AliGW; 05-15-2023 at 03:08 AM. Reason: Workbook added.
    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
    Registered User
    Join Date
    11-01-2015
    Location
    Stockholm, Sweden
    MS-Off Ver
    Office 365 Home
    Posts
    8

    Re: Highlight closest (future) date to today

    Absolutely BRILLIANT. That little S on the IF made a whole lot of difference :-) Many thanks!!

  4. #4
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Highlight closest (future) date to today

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

    Also, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.
    Dave

  5. #5
    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,877

    Re: Highlight closest (future) date to today

    You're welcome.

  6. #6
    Registered User
    Join Date
    11-01-2015
    Location
    Stockholm, Sweden
    MS-Off Ver
    Office 365 Home
    Posts
    8

    Re: Highlight closest (future) date to today

    Hi again AliGW! Circling back to this one, as I noticed that the formula needs tweaking, sorry. I've attached the file where you can see that it also highlights the row below the one intended, even though it doesn't have the word 'Confirmed' in the AA column. Why is that?
    Attached Files Attached Files

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

    Re: Highlight closest (future) date to today

    Just add another AND criterion:

    =AND($AA64="Confirmed",$AB64>=TODAY(),COUNTIFS($AB$64:$AB64,">="&TODAY(),$AA$64:$AA64,"Confirmed")=1)
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    11-01-2015
    Location
    Stockholm, Sweden
    MS-Off Ver
    Office 365 Home
    Posts
    8

    Re: Highlight closest (future) date to today

    Thanks SO MUCH AliGW!

  9. #9
    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,877

    Re: Highlight closest (future) date to today

    Glad to have helped.

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

    Also, if you have not already done so, you may not be aware that you can thank anyone who offered you help towards a solution for your issue by clicking the small star icon (* Add Reputation) located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of all those who offered help.

+ 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: 10
    Last Post: 09-06-2023, 08:19 PM
  2. Replies: 11
    Last Post: 06-05-2023, 01:36 AM
  3. [SOLVED] Highlight closest date to today (in the future - not past dates)
    By John19 in forum Excel General
    Replies: 5
    Last Post: 05-15-2023, 02:34 AM
  4. [SOLVED] Round Down Today's Date to Closest Prior Date in an Array?
    By jk2391 in forum Excel General
    Replies: 7
    Last Post: 07-13-2022, 11:58 AM
  5. Replies: 5
    Last Post: 06-29-2022, 12:15 AM
  6. The closest date to today...with a twist!
    By Maple1 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 02-02-2018, 09:52 AM
  7. Finding the closest future date from Today from a list of dates
    By maharg in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-18-2008, 09:45 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