Automated Checkbox is column contains one of multiple values

I have a "Preferred" checkbox that I would like to write a formula to automatically check if the "Client" column contains one of multiple values such as "Spatco" or "Guardian."

I keep getting "Incorrect" or "Unparseable"

IF(OR([Client]@row = "Spatco"), ([Client]@row = "Guardian"), 1, 0)

Thank you in advance for the help!

Best Answers

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

    Your parenthesis are off. You don't need the ones in the middle of the OR function.


    You have

    OR(this), (that)

    You should have

    OR(this, that)

  • Monique_Odom_Comcast
    Monique_Odom_Comcast ✭✭✭✭✭✭
    Answer ✓

    Hello @lcain,

    Is the Client column multiselect, or does it have spaces before or after the words? My suggestion would be to try a formula that uses contains instead of equals. Try the following:

    =IF(OR(CONTAINS("Spatco",[Client]@row),CONTAINS("Guardian",[Client]@row)), 1, 0)

    If my comment helped you, please help others by marking it as an accepted answer and consider helping me by clicking the 💡Insightful or ❤️Awesome buttons below!

    Monique Odom

    Business Process Excellence Manager

    Smartsheet Leader & Community Champion

    Pronouns: She/Her (What’s this?)

    “Take chances, make mistakes, get messy!” – Ms. Frizzle

  • Itai
    Itai ✭✭✭✭✭✭
    Answer ✓

    Hey @lcain

    I think the only issue is excess ().

    Try this: IF(OR([Client]@row = "Spatco", [Client]@row = "Guardian"), 1, 0)

    It worked for me when I tested it.

    Always follow the colors of the brackets, it will help you notice if you closed your formula too early.

    If you have a column with more than one word in the name then you use Square[] brackets.

    Hope that helps

    Itai Perez

    Project Manager | Transformation Department

    Gong cha

    If you found my comment helpful any reaction, Insightful, Awsome etc... would be appreciated🙂

    https://www.linkedin.com/in/itai-perez-740543116/

Answers

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

    Your parenthesis are off. You don't need the ones in the middle of the OR function.


    You have

    OR(this), (that)

    You should have

    OR(this, that)

  • Monique_Odom_Comcast
    Monique_Odom_Comcast ✭✭✭✭✭✭
    Answer ✓

    Hello @lcain,

    Is the Client column multiselect, or does it have spaces before or after the words? My suggestion would be to try a formula that uses contains instead of equals. Try the following:

    =IF(OR(CONTAINS("Spatco",[Client]@row),CONTAINS("Guardian",[Client]@row)), 1, 0)

    If my comment helped you, please help others by marking it as an accepted answer and consider helping me by clicking the 💡Insightful or ❤️Awesome buttons below!

    Monique Odom

    Business Process Excellence Manager

    Smartsheet Leader & Community Champion

    Pronouns: She/Her (What’s this?)

    “Take chances, make mistakes, get messy!” – Ms. Frizzle

  • Itai
    Itai ✭✭✭✭✭✭
    Answer ✓

    Hey @lcain

    I think the only issue is excess ().

    Try this: IF(OR([Client]@row = "Spatco", [Client]@row = "Guardian"), 1, 0)

    It worked for me when I tested it.

    Always follow the colors of the brackets, it will help you notice if you closed your formula too early.

    If you have a column with more than one word in the name then you use Square[] brackets.

    Hope that helps

    Itai Perez

    Project Manager | Transformation Department

    Gong cha

    If you found my comment helpful any reaction, Insightful, Awsome etc... would be appreciated🙂

    https://www.linkedin.com/in/itai-perez-740543116/