Formulas and Functions

Formulas and Functions

Ask for help with your formula and find examples of how others use formulas and functions to solve a similar problem.

IF AND OR Formula *almost* works correctly but one part!

Hiya folks- all arguments work correctly except turning Health the color Yellow when Recommended Due Date is within 3 days of current date and status is not Complete.

Here is what I need to accomplish:

IF [Status] is"Complete" or "Cancelled/NA" then [Health] ="Blue"

IF [Recommended DueDate] <= TODAY and [status] <> "complete" then [health] ="red"

IF [Recommended DueDate] <= TODAY(-3) and [status] <> "complete" then [health]= "yellow"

IF none of the aboveconditions exist [Health] = "green"

Current and almost accurate formula:

=IF(OR(Status@row = "Complete", Status@row = "Cancelled/NA"), "Blue", IF(AND([Recommended Due Date]@row <= TODAY(), Status@row <> "Complete"), "Red", IF(AND([Recommended Due Date]@row <= TODAY(-3), Status@row <> "Complete"), "Yellow", "Green")))

Note: I did try changing the last "AND" to an "OR" and it turned it yellow BUT it also turned other things yellow that it should not have.

Answers

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!

Trending in Formulas and Functions