Formula using TODAY when the date field is blank

Bhh ✭✭✭
edited 02/23/24 in Formulas and Functions

I am trying to write a formula to assign colors to project tasks. It appears to be including rows where End Date is blank when the criteria is [End Date]@row < TODAY. (Same for [Start Date]@row < TODAY).

=IF(Status@row = "{Link to Project Meeting Minutes}", "Green", (IF(AND([End Date]@row < TODAY(), Status@row <> "Complete"), "Red", IF(AND([Start Date]@row < TODAY(), Status@row = "Not Started"), "Yellow", IF(Status@row = "Deferred", "Gray", "Green")))))

I played with IF(ISDATE([End Date]@row) and even [End Date]@row <> "".

Thanks in advance for the help!



Best Answer

  • Carson Penticuff
    Carson Penticuff ✭✭✭✭✭✭
    Answer ✓

    I prefer to verify with ISDATE(). Give this a try:

    =IF(Status@row = "{Link to Project Meeting Minutes}", "Green", IF(AND(ISDATE([End Date]@row), [End Date]@row < TODAY(), Status@row <> "Complete"), "Red", IF(AND(ISDATE([Start Date]@row), [Start Date]@row < TODAY(), Status@row = "Not Started"), "Yellow", IF(Status@row = "Deferred", "Gray", "Green"))))


Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!