OR(HAS Function - limits to criteria?

I just learned from a ProDesk session that we needed to use HAS rather than CONTAINS, since will have more than one entry in a cell. However, we have one set of counts for three criteria in a cell. When I added the third one to the formula, it returned Unparsable. Is there a cap on how many HAS criteria you can count?

=COUNTIFS([Program type(s)]:[Program type(s)], OR(HAS(@cell, "EM"), HAS(@cell, "Core"), HAS(@cell, "Tele HM")), Summary:Summary, 0, Level:Level, >1))

Tags:

Answers

  • Kelly Moore
    Kelly Moore ✭✭✭✭✭✭

    Hey @Tina Rustvold

    It looks like you have an extra parenthesis at the end of your formula

  • Tina Rustvold
    Tina Rustvold ✭✭✭✭✭

    Thanks Kelly@Kelly Moore; we adjusted our criteria a bit and now we get an #INVLAID DATA TYPE. These are all references the correct data columns so I am back to wondering if this OR(HAS string has limitations on how many critiera we can add. We are so close!

    =COUNTIFS([Program type(s)]:[Program type(s)], OR(HAS(@cell, "EM"), HAS(@cell, "Core"), HAS(@cell, "HM"), Summary:Summary, 0, Status:Status, OR(@cell = "Complete", @cell = "N/A")))

  • Kelly Moore
    Kelly Moore ✭✭✭✭✭✭

    Hey @Tina Rustvold

    It's a parenthesis again. Whenever I'm stuck on trouble-shooting a formula, I place my cursor in the very last parenthesis and see what it is paired to. I then step backwards in each of the ending parentheses to see all of the pairs This may have helped find the misplaced parenthesis. In your formula above, you did not close off the first OR, which means you have an extra parenthesis at the end.

    =COUNTIFS([Program type(s)]:[Program type(s)], OR(HAS(@cell, "EM"), HAS(@cell, "Core"), HAS(@cell, "HM")), Summary:Summary, 0, Status:Status, OR(@cell = "Complete", @cell = "N/A"))

    There may be a limitation on the number of HAS functions in a formula, but I haven't hit it yet. It's been my experience when trouble shooting this isn't among the first error options to explore.

    Does the formula above work for you?

    Kelly

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!