How to get a nested IF statement to work?

My individual IF statements work but when I nest them I get an error. Not sure what I am doing wrong as it should be simple.

Here they are individually:

=IF(ISBLANK([License Research]@row), "Red")

=IF([License Research]@row = "Completed", "Yellow")

=IF([License Status]@row = "Obtained", "N/A", "Green")

Here they are nested:

IF(ISBLANK([License Research]@row), "Red"), IF([License Research]@row = "Completed", "Yellow"), IF([License Status]@row = "Obtained", "N/A", "Green")))

Best Answers


  • Tamee Fox
    Tamee Fox ✭✭✭

    Thank you, I knew it was something simple.

  • Tamee Fox
    Tamee Fox ✭✭✭

    I just found a new issue though, I need to actually have it read in this order or it will read the "Completed" argument first and make it "Yellow" when it should be reading the "Obtained" argument and make it "Green".

    =IF([License Status]@row = "Obtained", "N/A", "Green", IF([License Research]@row = "Completed", "Yellow", IF(ISBLANK([License Research]@row), "Red")))

    When I rearrange them in the above order I get an #incorrect argument set error.

  • Tamee,

    I think you have too many arguments in your first IF statement. I also don't believe that order matters, as the statements will evaluate ALL of the cases (unless it finds one that's true) regardless of order.

    Think of these in English: If license status field contains obtained, populate field with green, UNLESS license research field contains completed, then populate field with yellow, UNLESS license research field is blank, in which case populate the field with red. If none of these things are there, then populate with N/A. Is this what you want to happen?

    If so, then your "N/A" argument just needs to go at the end, after "Red". Optionally, you could just take the N/A out of the statement completely and if none of the arguments are true, the field will be left blank. I used that to troubleshoot some of mine.

    Jason Wirl

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!