Hello!
I'm trying to write a formula that will update the Health symbol of a task based on some of the other columns in my Smartsheet. I think I'm close, but I don't quite have it.
I want to set the Health symbol to "Yellow" if the date is within 7 days prior to the Target Completion Date OR if my % Complete column is less than the % in the YTD Time Elapsed column by 2% or less. I was able to come up with working formulas for each of these things separately, but I'm having trouble putting them together into one formula. These are the 2 pieces of formula I came up with:
=IF([Target Completion Date]@row > TODAY() - 7, "Yellow")
=IF(AND([% Complete]@row > ([YTD Time Elapsed]@row - 0.02), [% Complete]@row < [YTD Time Elapsed]@row), "Yellow")
The combined formula I came up with is below. It returns the Yellow symbol correctly for the % Complete part of the formula but not the date part of the formula.
=IF(AND([% Complete]@row > ([YTD Time Elapsed]@row - 0.02), [% Complete]@row < [YTD Time Elapsed]@row), IF(OR([Target Completion Date]@row > TODAY() - 7), "Yellow"))
Note that I plan on putting this into a complete formula where the Health symbol is
- Gray if the Status column is Not Started
- =IF((Status@row = "Not Started"), "Gray")
- Red if the Target Completion Date has passed OR % Complete is more than 2% less than the % in the YTD Time Elapsed column
- =IF(OR([Target Completion Date]@row < TODAY(), [% Complete]@row < ([YTD Time Elapsed]@row - 0.02)), "Red")
- Green if none of the situations for Gray, Red, or Yellow are met (on or after the Target Start Date but at least 7 days - or 5 workdays - prior to the Target Completion Date AND % Complete equals or is greater than the % in the YTD Time Elapsed column)
Sorry for the long post, but I'd appreciate any help anyone can provide.
Thanks!