Project Health Formula
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!
Answers
-
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:
- IF Function, OR Function, AND Function
- Create Efficient Formulas with @cell and @row
- Create a Cell or Column Reference in a Formula
Cheers~
Krissia
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 64K Get Help
- 410 Global Discussions
- 220 Industry Talk
- 459 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 137 Just for fun
- 57 Community Job Board
- 459 Show & Tell
- 31 Member Spotlight
- 1 SmartStories
- 298 Events
- 37 Webinars
- 7.3K Forum Archives