Can anyone tell me what's wrong with my formula?

I'm trying to set up a project plan that has color indicators for the timeline: RED=past due, Yellow=due in the next 5 days, Green=due in the next 14 days, Blue=due later.

=IF([Due Date]2 < TODAY(), "Red", IF(AND([Due Date]2 >= TODAY(), [Due Date]2 < TODAY(+5))), "Yellow", IF(AND([Due Date]2 >= TODAY(), [Due Date]2 < TODAY(+14))), "Green", "Blue")

Thank you so much in advance!

Best Answer

  • Matt Johnson
    Matt Johnson Community Champion
    Answer ✓

    Hi @Camille Armitstead

    I think the formula you are looking for is this one. I used the Smartsheet AI Formula generator for this. I copied and pasted your words "RED=past due, Yellow=due in the next 5 days, Green=due in the next 14 days, Blue=due later." Then changed RED to Red and the AI did the rest. Maybe I deserve partial credit for this one.

    =IF([Due Date]@row < TODAY(), "Red", IF([Due Date]@row <= TODAY() + 5, "Yellow", IF([Due Date]@row <= TODAY() + 14, "Green", "Blue")))

    I hope that helps.

    Matt

    Matt Johnson

    Sevan Technology

    Smartsheet Aligned Partner

Answers

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!