Countif & Contains

From what I can tell this formula should work, but it's returning a 1 when it should be returning a 2 =countif([Bakery - Emp Health, hygiene, supervision, knowled]@row,contains("C -",@cell)

Help?

Tags:

Best Answer

  • Kelly Moore
    Kelly Moore ✭✭✭✭✭✭
    Answer ✓

    Hey @Bija

    Try this formula

    =(LEN([Bakery - Emp Health, hygiene, supervision, knowled]@row) - LEN(SUBSTITUTE([Bakery - Emp Health, hygiene, supervision, knowled]@row, "C -", ""))) / LEN("C -")

    This formula calculates the difference in number of characters (length) of original cell minus remaining characters after "C -" is removed, all of this divided by the length of "C -".

    Will this work for you?

    Kelly

Answers

  • Kelly Moore
    Kelly Moore ✭✭✭✭✭✭
    Answer ✓

    Hey @Bija

    Try this formula

    =(LEN([Bakery - Emp Health, hygiene, supervision, knowled]@row) - LEN(SUBSTITUTE([Bakery - Emp Health, hygiene, supervision, knowled]@row, "C -", ""))) / LEN("C -")

    This formula calculates the difference in number of characters (length) of original cell minus remaining characters after "C -" is removed, all of this divided by the length of "C -".

    Will this work for you?

    Kelly

  • @Kelly Moore This worked! Thank you. I was not familiar with the LEN function.

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!