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
- Smartsheet Customer Resources
- 63.7K Get Help
- 406 Global Discussions
- 216 Industry Talk
- 456 Announcements
- 4.7K Ideas & Feature Requests
- 141 Brandfolder
- 136 Just for fun
- 57 Community Job Board
- 459 Show & Tell
- 31 Member Spotlight
- 1 SmartStories
- 297 Events
- 37 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!