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!
Best Answer
-
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!
Answers
-
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!
-
hey @jonnyp
did the above solve your issue?
I'm passionate about helping you leverage the truly awesome power of smartsheet!
-
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!
-
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"))))
-
Hi @Sarita Sah
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
Need more help? 👀 | Help and Learning Center
こんにちは (Konnichiwa), Hallo, Hola, Bonjour, Olá, Ciao! 👋 | Global Discussions
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.7K Get Help
- 433 Global Discussions
- 136 Industry Talk
- 468 Announcements
- 4.9K Ideas & Feature Requests
- 143 Brandfolder
- 147 Just for fun
- 64 Community Job Board
- 466 Show & Tell
- 32 Member Spotlight
- 2 SmartStories
- 298 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!