Welcome to the Smartsheet Forum Archives


The posts in this forum are no longer monitored for accuracy and their content may no longer be current. If there's a discussion here that interests you and you'd like to find (or create) a more current version, please Visit the Current Forums.

Nested IF Statements

Options

My nested IF statment =IF([% Complete]3 = 0, "Red", IF([% Complete]3 = 100, "Green", "Yellow")) is setting the symbol to "Yellow" when clearly the statment requires that IF([% Complete]3 = 100 (thie evaluates to true), "Green".

 

What am I missing? 

 

Nested_IF.PNG

Comments

  • Jeremy Myers
    Jeremy Myers ✭✭✭✭✭
    Options

    Sergio,

     

    You have formatted your % complete column as <%>, remove the % formatting and your argument will produce the correct result.  

     

    % Complete.jpg

  • Jason Rowe
    Options

    Sergio,

    You could also try

    =IF([% Complete]3 = 0, "Red", IF([% Complete]3 = 1, "Green", "Yellow"))

    Change your IF([% Complete]3 = 100 to IF([% Complete]3 = 1. When it's looking at your % formatted column it sees 1 as 100%, .9 as 90% etc.(I believe putting 100 would make it look for 10,000%)

    That way you can keep your % Complete column to % formatting.

     

  • Benjamin Walker
    Options

    Sergio,

     

    As Jeremy mentioned above. You may need to change the data formatting or your formula. Unless you have 100% inputed as a string, 100% is being evaluated as 1 currently in your sheet. 

  • proe
    proe ✭✭
    Options

    Hi guys!  Thanks for you help.

    =IF([%complete]19 <70, "Red" ,IF([%complete]19=100, "Green" ,"Yellow"))  STILL didn't work.  I got an error message

     

  • Benjamin Walker
    Options

    proe,

     

    You'll need to use the values 0.70 and 1

    100% = 1 for the purpose of comparisons. Hope this helps!

     

    Cheers,

    Ben

This discussion has been closed.