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
- Smartsheet Customer Resources
- 63.6K Get Help
- 403 Global Discussions
- 215 Industry Talk
- 455 Announcements
- 4.7K Ideas & Feature Requests
- 141 Brandfolder
- 136 Just for fun
- 56 Community Job Board
- 459 Show & Tell
- 31 Member Spotlight
- 1 SmartStories
- 296 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!