IF statement only half works

edited 08/15/23

Can someone take a look at this statement and tell me where I went wrong? The Blue works (both), the Green works and the Yellow works. The Red, not so much. The things that should be Red stay Yellow. Any help would be appreciated! / Days Left till Due is a formula of =[Anticipated Completion Date]@row - TODAY()

=IF([Current Status]@row = "Completed", "Blue", IF([Request Type]@row = "Daily / Weekly Task", "Blue", IF([Days Left till Due]@row > 2, "Green", IF([Days Left till Due]@row <= 2, "Yellow", IF([Days Left till Due]@row < 0, "Red")))))

Answers

• ✭✭✭✭✭✭
edited 08/15/23

The issue you are having is your yellow formula will never be false to reach the red formula because it is looking for any number equal to or less than 2. If you look for Red first and then yellow, then anything 0 or less would result in Red.

=IF([Current Status]@row = "Completed", "Blue", IF([Request Type]@row = "Daily / Weekly Task", "Blue", IF([Days Left till Due]@row > 2, "Green", IF([Days Left till Due]@row <= 0, "Red", IF([Days Left till Due]@row <= 2, "Yellow")))))

• Thank you!!! Totally worked!!

• ✭✭✭✭✭✭

Your Welcome.

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!