Nest IFs coming back #Unparseable

I am trying to create a formula that returns “Green” if Project Day Variance is less than or equal to 0, “Yellow” if Project Variance is between 1-10, or “Red” if Project Day Variance is great or equal to 11.

I tried to nest IFs, but I get Unparseable (see below):

=IF([Project Day Variance]@row <= 0, "Green"), IF(AND([Project Day Variance]@row >=1, [Project Day Variance]@row <=10)), "Yellow", IF([Project Day Variance]@row>11, "Red")

I can get it to work individually, but not combined.

@Paul Newcome thanks in advance

Best Answers

  • Darin Wagner
    Darin Wagner ✭✭
    edited 03/18/21 Answer ✓

    Bill,

    I think this might work for you:

    =IF([Project Day Variance]@row <= 0, "Green", IF(AND([Project Day Variance]@row > 0, [Project Day Variance]@row <= 10), "Yellow", IF([Project Day Variance]@row > 10, "Red")))


    Thanks!

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

    @Bill Schroeder Yes. It was you parenthesis. Think of it as the second IF being the 3rd portion of the first. The third IF is the 3rd portion of the second, so on and so forth.


    =IF(this is true, do this, otherwise do this)


    Your next IF is going to go into the "otherwise do this" portion.


    =IF(this is true, do this, otherwise run this other IF)

    =IF(this is true, do this, IF(this is true, do this, otherwise do this))


    All of your IFs get closed at the very end.

Answers

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!