# IF/AND Statements to change Symbol colors

I have a column in an equipment check-in/out sheet with Symbols (Red, Yellow, Green, Blue) where I am attempting an IF/AND statement to determine the color.

Yellow = OUT box is checked and the date is today

Red = OUT box is checked and the date is before today

Green = IN box is checked

Blue = Maint box is checked

Each individual formula works but when I put them all together, I receive an INCORRECT ARGUMENT.

Individual formulas:

=IF(AND(OUT@row = 1, [Due Date]@row = TODAY()), "Yellow")

IF(AND(OUT@row = 1, [Due Date]@row < TODAY()), “Red”

IF(IN@row = 1, "Green"

IF(Maint@row = 1, "Blue"

Formulas parsed together:

=IF(IN@row = 1, "Green", IF(Maint@row = 1, "Blue", IF(AND(OUT@row = 1, [Due Date]@row < TODAY(), "Red", IF(AND(OUT@row = TODAY(), "Yellow"))))))

Any assistance would be appreciated.

• Hello @tschlitz

If that is your formula you are missing 2 ")"

=IF(IN@row = 1, "Green", IF(Maint@row = 1, "Blue", IF(AND(OUT@row = 1, [Due Date]@row < TODAY()), "Red", IF(AND(OUT@row = TODAY()), "Yellow"))))))

• That worked! thank you!!

• Hello @tschlitz

If that is your formula you are missing 2 ")"

=IF(IN@row = 1, "Green", IF(Maint@row = 1, "Blue", IF(AND(OUT@row = 1, [Due Date]@row < TODAY()), "Red", IF(AND(OUT@row = TODAY()), "Yellow"))))))

• That worked! thank you!!

## Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!