What wrong with this IF OR Loop statement

=IF(OR([Site]@row= "Kelowna", [Site]@row="Vancouver", [Site]@row="Victoria"), "British Columbia", IF(OR([Site]@row= "Halifax", [Site]@row="Moncton", [Site]@row="St Johns", [Site]@row="Grand Montreal"), "Eastern", IF(OR[Site]@row= "Central", [Site]@row="Tannis", [Site]@row="SW Ontario", [Site]@row="Toronto") , "Ontario", "Prairies"))


I am getting # UNPARSEABLE error for this statement

Best Answer

  • DKazatsky
    DKazatsky ✭✭✭
    Answer ✓

    Hi @tprakash2211

    You are missing a paren after your 3rd "OR".

    =IF(OR([Site]@row= "Kelowna", [Site]@row="Vancouver", [Site]@row="Victoria"), "British Columbia", IF(OR([Site]@row= "Halifax", [Site]@row="Moncton", [Site]@row="St Johns", [Site]@row="Grand Montreal"), "Eastern", IF(OR([Site]@row= "Central", [Site]@row="Tannis", [Site]@row="SW Ontario", [Site]@row="Toronto") , "Ontario", "Prairies"))

    Hope that helps,

    -Dave

Answers

  • DKazatsky
    DKazatsky ✭✭✭
    Answer ✓

    Hi @tprakash2211

    You are missing a paren after your 3rd "OR".

    =IF(OR([Site]@row= "Kelowna", [Site]@row="Vancouver", [Site]@row="Victoria"), "British Columbia", IF(OR([Site]@row= "Halifax", [Site]@row="Moncton", [Site]@row="St Johns", [Site]@row="Grand Montreal"), "Eastern", IF(OR([Site]@row= "Central", [Site]@row="Tannis", [Site]@row="SW Ontario", [Site]@row="Toronto") , "Ontario", "Prairies"))

    Hope that helps,

    -Dave

  • Wow, Thanks a ton! It was super quick.

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!