# Need help with If/then status formulas

Options
✭✭✭

Hello!

I am trying to create a formula to show the status symbols for the projects I'm working on. The following formula keeps giving me an error and I am stumped.

=IF([Course 1 Due Date]@row), < TODAY(7), "Red" , IF([Course 1 Due Date]@row), < TODAY(14), "Yellow", IF([Course 1 Due Date]@row, < TODAY(30), "Blue")))

I am trying to do the following:

If the course is due within 7 days, I want the status to be red

If the course is due within 14 days, I want the status to be yellow

If the course is due within 30 days, I want the status to be blue

thank you!

• ✭✭✭✭✭✭
Options

You don't need to close the brackets around the [Course 1 Due Date]@row in the formula.

This should work:

=IF([Course 1 Due Date]@row < TODAY(7), "Red", IF([Course 1 Due Date]@row < TODAY(14), "Yellow", IF([Course 1 Due Date]@row < TODAY(30), "Blue")))

Sample:

Hope this solves it for you!

• ✭✭✭✭✭✭
Options

You pretty much had it, there were just a few extra comments.

=IF([Course 1 Due Date]@row) < TODAY(7), "Red", IF([Course 1 Due Date]@row) < TODAY(14), "Yellow", IF([Course 1 Due Date]@row < TODAY(30), "Blue")))

• ✭✭✭
Options

I am still getting the error... Any other suggestions?

This is what was inputted this time -

=IF([Course 1 Due Date]@row) < TODAY(7), "Red", IF([Course 1 Due Date]@row) < TODAY(14), "Yellow", IF([Course 1 Due Date]@row) < TODAY(30), "Blue")))

• ✭✭✭✭✭✭
Options

You don't need to close the brackets around the [Course 1 Due Date]@row in the formula.

This should work:

=IF([Course 1 Due Date]@row < TODAY(7), "Red", IF([Course 1 Due Date]@row < TODAY(14), "Yellow", IF([Course 1 Due Date]@row < TODAY(30), "Blue")))

Sample:

Hope this solves it for you!

• ✭✭✭
Options

THANK YOU!!

• ✭✭✭✭✭✭
Options

No problem, happy to have helped!

## Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!