Conditional formatting based on time from today

Options
jon.keane
jon.keane
edited 12/09/19 in Smartsheet Basics

I want to create conditional formatting rules on a Date column and cannot figure out how to enter Today in the criteria 

Example: 

Select column = EOL Date 

is < TODAY  = Red

is between  TODAY() and TODAY() + 180 = Yellow

is > TODAY() + 181 = Green 

I can do it in Excel just fine but when i enter TODAY() in the criteria it says "This is not a valid Date"                

I have tried variations of TODAY(), =TODAY() and still errors 

 

I feel like this should be core functionality, I have seen some post saying to add a bunch of extra columns to do the comparative logic but why would i want to do that when excel can accept formulas directly in the conditional formatting rules.  

Comments

  • Andrée Starå
    Andrée Starå ✭✭✭✭✭✭
    Options

    Hi Jon,

    Try something like this.

    Add a so called helper column. You can call it Status, Formatting or similar. You can change it to a RYG Column type if you'd like.

    You'd then structure the Conditional Formatting to change the color according to the result in the Column above.

    =IF(ISBLANK([EOL Date]@row); ""; IF([EOL Date]@row < TODAY(); "Red"; IF([EOL Date]@row > TODAY(180); "Green"; IF(AND([EOL Date]@row >= TODAY(); [EOL Date]@row < TODAY(180)); "Yellow"))))

    The same version but with the below changes for your and others convenience.

    =IF(ISBLANK([EOL Date]@row), "", IF([EOL Date]@row < TODAY(), "Red", IF([EOL Date]@row > TODAY(180), "Green", IF(AND([EOL Date]@row >= TODAY(), [EOL Date]@row < TODAY(180)), "Yellow"))))

    Depending on your country you’ll need to exchange the comma to a period and the semi-colon to a comma.

    Did it work?

    Hope that helps!

    Have a fantastic weekend!

    Best,

    Andrée Starå

    Workflow Consultant / CEO @ WORK BOLD

    SMARTSHEET EXPERT CONSULTANT & PARTNER

    Andrée Starå | Workflow Consultant / CEO @ WORK BOLD

    W: www.workbold.com | E:andree@workbold.com | P: +46 (0) - 72 - 510 99 35

    Feel free to contact me for help with Smartsheet, integrations, general workflow advice, or anything else.