Using the Trim Formula Start by adding the Helper column to the end of your data, and name it “Trim.” In the first cell of the Helper column, enter the Excel formula to remove spaces =TRIM (A2).
If you just want to remove the extra space, leading spaces and the trailing spaces from strings, you can apply this formula: Select a cell where you will put the result, and type this formula =TRIM(A2), press Enter key, and then the drag the auto fill handle over the cells which need this formula.
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.
It is SUBSTITUTE(B1," ","")
, not REPLACE(xx;xx;xx)
.
Steps (1) Just Select your range, rows or column or array , (2) Press ctrl+H , (3 a) then in the find type a space (3 b) in the replace do not enter anything, (4)then just click on replace all..... you are done.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With