Automations "Equals" vs "Contains"

Mark K
Mark K ✭✭
edited 01/29/25 in Formulas and Functions

Has anyone experienced issues with automations behaving differently when using "Equals" versus "Contains"? On one of our sheets, I have an automation that only works if "Cost Center equals 302110000". However, if I use "Cost Center contains 302110000", it never triggers. Similarly, a separate automation only works if "Department equals 110". If I use "Department contains 110", it doesn't trigger. The only difference I can see is that the Department is calculated from the Cost Center. Oddly, when using just the filter on the page, it treats them as the same.

Tags:

Best Answer

  • Kelly Moore
    Kelly Moore Community Champion
    Answer ✓

    Hey @Mark K

    The CONTAINS function works best for text strings, not numbers. You can switch to the FIND function to mitigate. Remember that the FIND function returns numbers, not T/F so you need FIND(302110000,@cell)>0 as the criteria. Note there are no quotes around the number as to keep the number as numeric and not convert it to a textstring.

    Does this work for you?
    Kelly

Answers

  • Kelly Moore
    Kelly Moore Community Champion
    Answer ✓

    Hey @Mark K

    The CONTAINS function works best for text strings, not numbers. You can switch to the FIND function to mitigate. Remember that the FIND function returns numbers, not T/F so you need FIND(302110000,@cell)>0 as the criteria. Note there are no quotes around the number as to keep the number as numeric and not convert it to a textstring.

    Does this work for you?
    Kelly

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!