Home » Our Blog » Excel – removing unwanted spaces from a cell

Excel – removing unwanted spaces from a cell

PROBLEM: Wasting time removing unwanted spaces in Excel data.

SOLUTION: Get to know the Trim function and save yourself time (and headaches).



Excel – removing extra spaces using The TRIM function

Clean-up unwanted spaces using the TRIM function.  In the example below the data in column A has been imported from an external data source.  The data in column B is the result of using the formula shown in column C.  As you can see, the TRIM function has removed ALL unnecessary spacing.

I love this function!  It saves a HUGE amount of time.  It’s especially useful when using the Text to Columns feature as sometimes this can create an unwanted space in front of data as it is distributed to individual columns.

If I needed to now replace the formulas in column B with the result I would select from B2 to B4, copy the data and then right-click and select Paste Values.  This will then paste the names into the cells and remove the formula.  I would then delete column A as it is not good for anything.

If you found this post helpful please ‘Like’ us!