How to fix a formula for schedule health

Hello! I have a functioning formula for schedule health for my project plan but it needs some changes and I just can't manage to do it without breaking it. The criteria for the current formula is

Blue – task is β€˜β€™Complete’’

Green – task is β€˜β€™In Progress’’ and on schedule

Yellow - task is β€˜β€™In Progress’’ and End Date is 2 or less days away, OR up to 2 days past the End Date

Red - Status is β€˜β€™In Progress’’ and more than 2 days have passed since the End Date

This is the current formula:

=IF(Status@row = "Complete", "Blue", IF(AND(Status@row = "In Progress", [End Date]@row > TODAY() + 2), "Green", IF(AND(Status@row = "In Progress", [End Date]@row <= TODAY() + 2, [End Date]@row >= TODAY() - 2), "Yellow", IF(AND(Status@row = "In Progress", [End Date]@row < TODAY() - 2), "Red", ""))))

And it works just fine. Now, I need to slightly change the criteria and incorporate it in the formula. These are the new criteria:

Blue – task is β€˜β€™Complete’’

Green – task is β€˜β€™In Progress’’ and on schedule

Yellow - task is ''In Progres'', starts 1 day after the End Date and continues up to 5 BUSINESS DAYS pass the End Date

Red - task is β€˜β€™In Progress’’ and more than 5 BUSINESS DAYS have passed since the End Date

Could you please help me update my original formula? Thank you so much in advance!

Answers

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!