Combined Multiple IF CONTAINS Functions

Hi,

I have the following formula

=IF(CONTAINS([Column A]@row, {Sheet A Range 1}), "Sheet A", IF(CONTAINS([Column A]@row, {Sheet B Range 1}), "Sheet B")

Now I want to add if both sheets contain [Column A]@row, result: "Sheets A and B",

How do I add this last part in addition to my current formula?

Any help is appreciated,

Thank you,

Best Answer

  • Ryan Sides
    Ryan Sides ✭✭✭✭✭✭
    Answer ✓

    Hi @A Rose You can add another IF statement to the front of your formula and use the AND operator to check that both ranges contain Column A's value.

    =IF(AND(CONTAINS([Column A]@row, {Sheet A Range 1}), CONTAINS([Column A]@row, {Sheet B Range 1})), "Sheets A and B", IF(CONTAINS([Column A]@row, {Sheet A Range 1}), "Sheet A", IF(CONTAINS([Column A]@row, {Sheet B Range 1}), "Sheet B"))

    Does that work for ya?

    Ryan Sides

    Smartsheet Tips and Tricks for Beginners and Advanced on LinkedIn and YouTube

    Come Say Hello!

Answers

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!