Why is my IF formula not producing the correct color circles?

smbrown929
edited 07/03/23 in Formulas and Functions

Here is the formula I am using and every time I adjust it the formula always returns a red circle no matter what I change:

=IF([Profit Margin]@row < "30.00%", "Red", IF(AND([Profit Margin]@row = "30.00%"), "Yellow", "Green"))

I have also tried this formula: =IF([Profit Margin]@row < "30.00%", "Red", (IF(AND([Profit Margin]@row = "30.00%"), "Yellow", IF(AND([Profit Margin]@row > "30.00%"), "Green", ""))))

Best Answer

  • Lucas Rayala
    Lucas Rayala ✭✭✭✭✭
    Answer ✓

    @smbrown929, when you add quotes around the percentage, you turn it into a word (vs a number). Try this:

    =IF([Profit Margin]@row < 0.3, "Red", IF(AND([Profit Margin]@row = 0.03), "Yellow", "Green"))

    Numbers don't need/shouldn't have quotes around them.

Answers

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!