Excel formula to remove space between words in a cell

user1180001 picture user1180001 · Feb 8, 2012 · Viewed 177.4k times · Source

I've a huge data in excel file.

For eg: say i've a word like paul son,i've to make it as paulson.

input:paul son output:paulson.

In some cells ,i've data like mic-li,when this type of words come,it should not replace any thing,it should only remove spaces in between words.

Answer

vulkanino picture vulkanino · Feb 8, 2012

Suppose the data is in the B column, write in the C column the formula:

=SUBSTITUTE(B1," ","")

Copy&Paste the formula in the whole C column.

edit: using commas or semicolons as parameters separator depends on your regional settings (I have to use the semicolons). This is weird I think. Thanks to @tocallaghan and @pablete for pointing this out.