Health Formula

EMAT
EMAT
edited 01/30/23 in Formulas and Functions

I'm currently trying to create a formula that will allow me to update the health status of tasks using both the due date data and the status of the work. I've tried looking at other discussion forums, but using those formulas does not seem to be working for me as they are causing errors. Is there anyone out there that's particularly good at creating formulas that can help me?


Tags:

Best Answer

  • Devin Lee
    Devin Lee ✭✭✭✭✭
    Answer ✓

    The formula below should work.

    =IF([Work Progress]@row = "COMPLETE", "Blue", IF([Work Progress]@row = "DELAYED", "Yellow", IF([Work Progress]@row = "CANCELLED", "Blue", IF([Work Progress]@row = "IN PROGRESS", IF(AND(TODAY() < [Start Date]@row, [End Date]@row < TODAY()), "Red", IF(AND(TODAY() >= [Start Date]@row, TODAY() <= [End Date]@row), "Yellow", "Red")), IF(TODAY() < [Start Date]@row, "Green", IF(AND(TODAY() >= [Start Date]@row, TODAY() <= [End Date]@row), "Yellow", "Red"))))))
    

    =IF([Work Progress]@row = "COMPLETE", "Blue", IF([Work Progress]@row = "DELAYED", "Yellow", IF([Work Progress]@row = "CANCELLED", "Blue", IF([Work Progress]@row = "IN PROGRESS", IF(AND(TODAY() < [Start Date]@row, [End Date]@row < TODAY()), "Red", IF(AND(TODAY() >= [Start Date]@row, TODAY() <= [End Date]@row), "Yellow", "Red")), IF(TODAY() < [Start Date]@row, "Green", IF(AND(TODAY() >= [Start Date]@row, TODAY() <= [End Date]@row), "Yellow", "Red"))))))

Answers

  • Nick Korna
    Nick Korna ✭✭✭✭✭✭

    Hi @EMAT,

    What results are you looking to get based on what criteria?

    If you can give some examples then we should be able to help out.

  • I've written it out based on how I'm hoping the Health status will react automatically with symbols based on criteria in other cells. Here's what I've got:

    Does this help?

  • Devin Lee
    Devin Lee ✭✭✭✭✭
    Answer ✓

    The formula below should work.

    =IF([Work Progress]@row = "COMPLETE", "Blue", IF([Work Progress]@row = "DELAYED", "Yellow", IF([Work Progress]@row = "CANCELLED", "Blue", IF([Work Progress]@row = "IN PROGRESS", IF(AND(TODAY() < [Start Date]@row, [End Date]@row < TODAY()), "Red", IF(AND(TODAY() >= [Start Date]@row, TODAY() <= [End Date]@row), "Yellow", "Red")), IF(TODAY() < [Start Date]@row, "Green", IF(AND(TODAY() >= [Start Date]@row, TODAY() <= [End Date]@row), "Yellow", "Red"))))))
    

    =IF([Work Progress]@row = "COMPLETE", "Blue", IF([Work Progress]@row = "DELAYED", "Yellow", IF([Work Progress]@row = "CANCELLED", "Blue", IF([Work Progress]@row = "IN PROGRESS", IF(AND(TODAY() < [Start Date]@row, [End Date]@row < TODAY()), "Red", IF(AND(TODAY() >= [Start Date]@row, TODAY() <= [End Date]@row), "Yellow", "Red")), IF(TODAY() < [Start Date]@row, "Green", IF(AND(TODAY() >= [Start Date]@row, TODAY() <= [End Date]@row), "Yellow", "Red"))))))

  • That worked! Thank you!

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!