Column Value to Multiselect
Hello - I'm using a multiselect formula but it's populating a "0" in front of the multiselect if the multiselect is zero or one value.
My formula:
=IF(CONTAINS("Yes", [Air Travel]@row), "Air/Flight" + CHAR(10)) + IF(CONTAINS("Yes", [Rental Car]@row), "Car" + CHAR(10)) + IF(CONTAINS("Yes", Hotel@row), "Hotel" + CHAR(10))
How can I have it remove the 0?
I tried using the in-sheet automation to select values but it keeps removing previously selected values, even though it's set to not replace values:
It removed "car"
Best Answer
-
Give this a try:
=IF(CONTAINS("Yes", [Air Travel]@row), "Air/Flight" + CHAR(10), "") + IF(CONTAINS("Yes", [Rental Car]@row), "Car" + CHAR(10), "") + IF(CONTAINS("Yes", Hotel@row), "Hotel" + CHAR(10), "")
Answers
-
Give this a try:
=IF(CONTAINS("Yes", [Air Travel]@row), "Air/Flight" + CHAR(10), "") + IF(CONTAINS("Yes", [Rental Car]@row), "Car" + CHAR(10), "") + IF(CONTAINS("Yes", Hotel@row), "Hotel" + CHAR(10), "")
-
Thank you, @Paul Newcome!
-
Happy to help. 👍️
I tried to bold the changes, but they don't stand out very well. Basically we just told each IF statement to output a blank if false. Leaving that portion blank usually outputs a blank but when "adding" IF statements together to create a string, I have noticed that Smartsheet tries to literally add the outputs together if there is nothing there. Since there was nothing, it was "zero plus.....".
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.9K Get Help
- 441 Global Discussions
- 140 Industry Talk
- 472 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 68 Community Job Board
- 497 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!