# Project Health formula

Options
✭✭

I want to create a formula that accomplishes the following:

If [Target End Date] is today or later or if [Actual End Date] is on or before target end date = Green

If [Target End Date] is 1-3 days ago and [Actual End Date] is blank or [Actual End Date] is 1-3 days later than [Target End Date] = Yellow

If [Target End Date] is 4+ days ago and [Actual End Date] is blank or [Actual End Date] is 4+ days later than [Target End Date] = Red

Essentially Green = If the task is either in the future or was completed by the target date, Yellow is if the task is currently overdue 1-3 days or if it was completed 1-3 days late, and Red is if the task is currently overdue 4+ days or was completed 4+ days late.

Can I do this? I figured out how to do the if/and but can I add an if/and/or ? I've been trying and not getting the results I'm hoping.

Thank you!

• ✭✭✭✭✭✭
Options

Try something like this...

=IF([Actual End Date]@row <> "", IF([Actual End Date]@row>= [Target End Date]@row + 4, "Red", IF([Actual End Date]@row> [Target End Date]@row, "Yellow", "Green")), IF(TODAY()>= [Target End Date]@row + 4, "Red", IF(TODAY()> [Target End Date]@row, "Yellow", "Green")))

• ✭✭✭✭✭✭
Options

Try something like this...

=IF([Actual End Date]@row <> "", IF([Actual End Date]@row>= [Target End Date]@row + 4, "Red", IF([Actual End Date]@row> [Target End Date]@row, "Yellow", "Green")), IF(TODAY()>= [Target End Date]@row + 4, "Red", IF(TODAY()> [Target End Date]@row, "Yellow", "Green")))

• ✭✭
Options

@Paul Newcome Thank you SO much!! That worked perfectly.

• ✭✭✭✭✭✭
Options

Happy to help. 👍️

## Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!