If(contains) Function Not Giving True Value

I am having a problem with my If(Contains) function. I cannot get it to give me the True value no matter what I try. My if true value I want it to pull is the value that is listed in the "Task" cell.

Here is a screenshot of the formula and data:

=IF(CONTAINS(2, Level@row), Task@row, "fail")

image.png


image.png


Best Answer

  • JamesB
    JamesB ✭✭✭✭✭✭
    Answer βœ“

    @Kurt T.

    The contains function seems to be having an issue using a number as the reference data. I tried it with text instead of a number and the contains works. However, since you are referencing just a number, you do not need the contain function. You can write the logical expression directly. Try the formula below.

    =IF(Level@row=2,Task@row,"fail")

Answers

  • JamesB
    JamesB ✭✭✭✭✭✭
    Answer βœ“

    @Kurt T.

    The contains function seems to be having an issue using a number as the reference data. I tried it with text instead of a number and the contains works. However, since you are referencing just a number, you do not need the contain function. You can write the logical expression directly. Try the formula below.

    =IF(Level@row=2,Task@row,"fail")

  • Kurt T.
    Kurt T. ✭✭

    Wow, so simple. Thanks!

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!