# If / and / contains formula

✭✭

Hello,

Trying to get a formula to check an "active" box if two conditions are presents. Essentially when both these if conditions are true.

IF(CONTAINS(Docs@row, {Active Docs}, 1, 0))

IF(CONTAINS([Trade Partner]@row, {Active Clients}, 1, 0))

Trying the below gives me an #INCORRECT ARGUMENT

=IF(AND(CONTAINS(Docs@row, {Active Docs}), CONTAINS([Trade Partner]@row, {Active Clients}), 1, 0))

Would appreciate any help. Thanks!

Tags:

• ✭✭✭✭

one more bracket after {Active Clients}, one less bracket after 0:

=IF(AND(CONTAINS(Docs@row, {Active Docs}), CONTAINS([Trade Partner]@row, {Active Clients})), 1, 0)

I'm passionate about helping you leverage the truly awesome power of smartsheet!

https://www.fiverr.com/smartlew

• ✭✭✭✭

one more bracket after {Active Clients}, one less bracket after 0:

=IF(AND(CONTAINS(Docs@row, {Active Docs}), CONTAINS([Trade Partner]@row, {Active Clients})), 1, 0)

I'm passionate about helping you leverage the truly awesome power of smartsheet!

https://www.fiverr.com/smartlew

• ✭✭✭✭

hey @jonnyp

did the above solve your issue?

I'm passionate about helping you leverage the truly awesome power of smartsheet!

https://www.fiverr.com/smartlew

• ✭✭

Hi @SmartLew. That worked... but made me realize that those CONTAINS functions aren't doing what I needed them to. 2 steps forward, 1 step back.

• ✭✭✭✭

what is it you are trying to achieve? Let me see if I can help

I'm passionate about helping you leverage the truly awesome power of smartsheet!

https://www.fiverr.com/smartlew

• ✭✭

I was trying to conflate 2 separate statuses into one column but ended up breaking them out and it achieved what I needed. Thanks for your help.

• Please help with this formula. its returning as Incorrect Argument. I want to display "Completed" Or "Pending" if two different words or combination i.e. "No" and "Complete" available in the status column.

@Paul Newcome, @Bassam Khalil, @SmartLew

=IF(AND(CONTAINS("No", Status@row, CONTAINS("complete", Status@row, "Completed", "Pending"))))

Do you mean if either "No" OR "Complete" are found in the Status cell?

If so, try this:

=IF(OR(CONTAINS("No", Status@row), CONTAINS("complete", Status@row)), "Completed", "Pending")

It looks like you were just missing the closing parentheses for each of your functions.

Cheers,

Genevieve

## Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!