Nested IF Fomula help

Hi!

Can anyone tell me what is wrong with my formula below? I am having trouble identifying

=IF(ISBLANK([Contractor Name]@row), "No", IF(OR([Contractor Name]@row = "NA"), "No", IF([Contractor Name]@row = "RLM"), "No", IF([Contractor Name]@row = "Danny"), "No", IF(ISBLANK(Phone@row), "No", "Yes")))

Tags:

Answers

  • bisaacs
    bisaacs ✭✭✭✭✭

    Hey @Kpennington,

    I don't think you have enough closing parenthesis at the end of the formula. You should have the same number of closing parenthesis as you have IF statements. I think you could also cut down the number of IF statements by restructuring the formula like so:

    =IF(OR(ISBLANK([Contractor Name]@row), [Contractor Name]@row = "NA", [Contractor Name]@row = "RLM", [Contractor Name]@row = "Danny", ISBLANK(Phone@row)), "No", Yes")

    Let me know if this works!

    If my response was helpful in any way (or answered your question) please be sure to upvote it, mark it as awesome, or mark it as the accepted answer!

    I'm always looking to connect with other industry professionals, feel free to connect with me on LinkedIn as well!

  • Nick Korna
    Nick Korna ✭✭✭✭✭✭

    Hi @Kpennington,

    You have some brackets closing some of your IFs which should be moved to the end:

    =IF(ISBLANK([Contractor Name]@row), "No", IF(OR([Contractor Name]@row = "NA"), "No", IF([Contractor Name]@row = "RLM", "No", IF([Contractor Name]@row = "Danny", "No", IF(ISBLANK(Phone@row), "No", "Yes")))))

    I'm not sure why you have an OR for a single IF. To use this properly you would have something more like this:

    =IF(OR([Contractor Name]@row = "", [Contractor Name]@row = "NA", [Contractor Name]@row = "RLM", [Contractor Name]@row = "Danny", Phone@row = ""), "No", "Yes")

    Hope this helps, but if you've any problems/questions then just let us know!

  • You are exactly right, that OR was leftover from when we thought we could do "N/A' or "NA" but was resolved in another way. Thank you so much!

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!