# 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!

• Moderator
Options

Hi @EJ

After testing & reviewing what you are trying to accomplish, I came up with the formula below:

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

Hope this helps!

See more in the links below:

Cheers~

Krissia