Trying to evaluate multiple columns with an IF statement

I keep getting a syntax error for some reason but can't figure out why. I am basically trying to set a status icon of 'Sunny" if the status of the risk is "closed" and if not closed, i am using the other icons based on the level of the risk. here is the formula:

=IF([Status]@row = “Closed”, “sunny”, IF([Risk Score]@row <= 25, "partly sunny", IF([Risk Score]@row > 25, IF([Risk Score]@row <= 50, "cloudy", IF([Risk Score]@row > 50, IF([Risk Score]@row <= 90, "rainy", "stormy"))))))


anyone have any ideas what i am doing wrong?

Tags:

Best Answer

  • Paul Newcome
    Paul Newcome ✭✭✭✭✭✭
    Answer ✓

    I think you are overcomplicating it. Try this instead:

    =IF([Status]@row = "Closed", "sunny", IF([Risk Score]@row <= 25, "partly sunny", IF([Risk Score]@row <= 50, "cloudy", IF([Risk Score]@row <= 90, "rainy", "stormy"))))


    It also looks like some of your quotes are slanted and others are straight up and down. The slanted ones are called "Smart Quotes" which (ironically enough) are not recognized as valid characters in Smartsheet formulas. You will need to either retype them here in the Community (which I did above already), directly in Smartsheet, or in a text editor such as Notepad (not Word).

Answers

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!