# If then greater than or equal to....

Options
✭✭
edited 04/26/23

I am working on a task list that will return green, yellow, or red based on criteria with today's date and the due date. Everything appears to be working unless the total equals the today - the due date + 7. I have this column formula and one cell will not work correctly. Help!

=IF(TODAY() - [Due Date]@row < 0, "Green", IF(TODAY() - [Due Date]@row < Duration@row, "Yellow", IF(TODAY() - [Due Date]@row >= Duration@row + 7, "Red")))

I ended up changing the formula to =IF(TODAY() - [Due Date]@row < 0, "Green", IF(TODAY() - [Due Date]@row < Duration@row, "Yellow", IF(TODAY() > [Due Date]@row, "Red"))).

• ✭✭✭✭✭
Options

@blmccue When I put the formula in a test sheet it works for me. Did the formula end up working for you?

• ✭✭
Options

Shelby, the original formula would not work so I changed it to:

=IF(TODAY() - [Due Date]@row < 0, "Green", IF(TODAY() - [Due Date]@row < Duration@row, "Yellow", IF(TODAY() > [Due Date]@row, "Red"))).

## Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!