Combined Multiple IF CONTAINS Functions

Options
✭✭✭✭

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,

Tags:

• ✭✭✭✭✭✭
Options

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

Come Say Hello!

• ✭✭✭✭✭✭
Options

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

Come Say Hello!

• ✭✭✭✭
Options

Thank you so much @Ryan Sides!

• ✭✭✭✭✭✭
Options

@A Rose You're welcome! Happy to help.

Ryan Sides

Come Say Hello!

• Options

Hi,

Can someone help me with a formula to display "Yes" and "No" for multiple categories available in a column. I want to display "Yes" for Defect, Escalations, SLA Miss & CRM Issue. Display "No" for Admin Request, Project and Child ticket.

This is the formula I am trying:

=IF(OR(CONTAINS("Defect", [Issue Type]@row, CONTAINS("SLA Miss", [Issue Type]@row, CONTAINS("CRM Issue", [Issue Type]@row, CONTAINS("Escalations", [Issue Type]@row)), "Yes", "No"))))

• ✭✭✭✭✭✭
Options

I hope you're well and safe!

Try something like this.

=IF(OR([Issue Type]@row = "Defect", [Issue Type]@row = "SLA Miss", [Issue Type]@row = "CRM Issue"), "Yes", IF([Issue Type]@row = "Escalations", "No"))

Did that work/help?

I hope that helps!

Be safe, and have a fantastic week!

Best,

Andrée Starå | Workflow Consultant / CEO @ WORK BOLD

Did my post(s) help or answer your question or solve your problem? Please support the Community by marking it Insightful/Vote Up, Awesome, or/and as the accepted answer. It will make it easier for others to find a solution or help to answer!

SMARTSHEET EXPERT CONSULTANT & PARTNER

Andrée Starå | Workflow Consultant / CEO @ WORK BOLD

W: www.workbold.com | E:andree@workbold.com | P: +46 (0) - 72 - 510 99 35

Feel free to contact me for help with Smartsheet, integrations, general workflow advice, or anything else.

• Options

Thanks a lot, it worked :)

• ✭✭✭✭✭✭
Options

Excellent!

Happy to help!

Remember! Did my post(s) help or answer your question or solve your problem? Please support the Community by marking it Insightful/Vote Up/Awesome or/and as the accepted answer. It will make it easier for others to find a solution or help to answer!

SMARTSHEET EXPERT CONSULTANT & PARTNER

Andrée Starå | Workflow Consultant / CEO @ WORK BOLD

W: www.workbold.com | E:andree@workbold.com | P: +46 (0) - 72 - 510 99 35

Feel free to contact me for help with Smartsheet, integrations, general workflow advice, or anything else.

• ✭✭✭✭
Options

Hi,

I have a similar formula I need help with please,

=IF(AND(CONTAINS([Client Name]@row, {Sheet A Range 1}), IF({Sheet A Range 2}, >=TODAY(-7))), "Match")

Any idea how to correct this #INVALID DATA TYPE?

Thank you!

• ✭✭✭✭
Options

Posting this as a new question since this is an old conversation.

here.

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!