Problem with nested IF/CONTAINS for Multi-Select Column and Zeros
Hi all,
How do I get rid of the zeros in this formula? (And why does it seem to work fine for Monday and Tuesday only selections?!!?)
Below is the text of the formula and it is citing a multi-select column. Class Days Short is a text/number column.
=IF(CONTAINS("Monday", [Class Days]@row), "M, ") + IF(CONTAINS("Tuesday", [Class Days]@row), "T, ") + IF(CONTAINS("Wednesday", [Class Days]@row), "W, ") + IF(CONTAINS("Thursday", [Class Days]@row), "R, ") + IF(CONTAINS("Friday", [Class Days]@row), "F ")
When I try to wrap the entire thing in an IF formula, all results go away:
=IF(IF(CONTAINS("Monday", [Class Days]@row), "M, ") + IF(CONTAINS("Tuesday", [Class Days]@row), "T, ") + IF(CONTAINS("Wednesday", [Class Days]@row), "W, ") + IF(CONTAINS("Thursday", [Class Days]@row), "R, ") + IF(CONTAINS("Friday", [Class Days]@row), "F ") = 0, "")
Thanks,
Joanna Cardinal (she, her, hers)
Best Answer
-
Hi @JCardinal
I hope you're well and safe!
Try something like this.
=IF(CONTAINS("Monday", [Class Days]@row), "M, ", "") + IF(CONTAINS("Tuesday", [Class Days]@row), "T, ", "") + IF(CONTAINS("Wednesday", [Class Days]@row), "W, ", "") + IF(CONTAINS("Thursday", [Class Days]@row), "R, ", "") + IF(CONTAINS("Friday", [Class Days]@row), "F ", "")
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.
Answers
-
Hello @JCardinal ,
I think you may need helper columns and a join to do this. Create 5 helper columns, for each day of week with the name of that week as the column header. The formula for each helper column should be:
=IF(CONTAINS("Monday", [Class Days]@row), "M"), ..., etc
For Class Short Days column, use the formula:
=Join(Monday@row:Friday@row, ", ")
Hope that helps!
-
Hi @JCardinal
I hope you're well and safe!
Try something like this.
=IF(CONTAINS("Monday", [Class Days]@row), "M, ", "") + IF(CONTAINS("Tuesday", [Class Days]@row), "T, ", "") + IF(CONTAINS("Wednesday", [Class Days]@row), "W, ", "") + IF(CONTAINS("Thursday", [Class Days]@row), "R, ", "") + IF(CONTAINS("Friday", [Class Days]@row), "F ", "")
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.
-
Thank you both for your recommendations. I swear I tried it with the value if false bit and it didn't work, but this morning it did. Hooray!
Joanna Cardinal (she, her, hers)
-
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.
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.8K Get Help
- 434 Global Discussions
- 138 Industry Talk
- 470 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 65 Community Job Board
- 486 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!