use the red, green, yellow, and grey symbols in the Health column

Options
This discussion was created from comments split from: If statement paired with a Smartsheet Symbol.

Answers

  • Bviola
    Bviola
    edited 06/26/24
    Options

    I have a similar question. I would like to use the red, green, yellow, and grey symbols in the Health column of a smartsheet and would like it to dynamically update the value of each depending on how far out the due date is.

    Basically, if the due date is more than 7 days out, I want it Green, if the due date is less than 7 days out, I want it Yellow, if the due date is past due, I want it to turn Red.

    I tried writing this and got an unparseable message:

    =IF([Due Date]@row < 8, "Yellow") ELSE IF([Due Date]@row <1 "Red"), ELSE IF([Due Date]@row >7 = "Green", "Gray")

    Anyone know how to fix it? Thanks in advance!

    UPDATE: I also just tried the following and it also did not work…

    =IF([Due Date]@row <1, "Red", IF([Due Date]@row <8 AND >1, "Yellow", IF([Due Date]@row >7, "Green")))

  • Paul Newcome
    Paul Newcome ✭✭✭✭✭✭
    Options
  • SoS | Dan Palenchar
    SoS | Dan Palenchar ✭✭✭✭✭✭
    edited 06/27/24
    Options

    Hello @Bviola,

    Here is a formula that will work for you:

    =IF(ISDATE([Due Date]@row), IF([Due Date]@row < TODAY(), "Red", IF([Due Date]@row - TODAY() <= 7, "Yellow", IF([Due Date]@row - TODAY() > 7, "Green"))), "Gray")

    It outputs like this:

    Here is a published Sheet you can interact with.

    School of Sheets (Smartsheet Partner)

    If my answer helped please accept and react w/💡Insightful, ⬆️ Vote Up, ❤️Awesome!

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!