# Column Value to Multiselect

Options
✭✭✭✭
edited 09/12/23

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"

• ✭✭✭✭✭✭
Options

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), "")

• ✭✭✭✭✭✭
Options

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), "")

• ✭✭✭✭
Options

Thank you, @Paul Newcome!

• ✭✭✭✭✭✭
Options

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

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!