How to remove leading and trailing spaces in Excel 2007/2010?
This article provides ways to unhide the hidden worksheets in Excel 2007/2010 step by step.
- using Trim function in Excel to remove leading and trailing spaces
- a fast way to remove all the leading and trailing spaces in Excel
Office Tab: Enable Tabbed Editing and Browsing in Office, Just Like Chrome, Firefox, IE 8/9/10. Read more...
Classic Menu for Office: Bring Classic Menus and Toolbars of Office 2003/XP/2000 Back to Office 2007, 2010 and 2013. Read more...
The syntax for the TRIM function is:
= TRIM ( Text )
Like the following example shows, to remove the space in the cell C11, just click a new cell and enter the trim formula to apply the modification. See screenshot (Fig. 1).
Fig.1 trim function in Excel
Note: The TRIM function will not remove all space characters. In particular one commonly used space character that TRIM will not remove is the non-breaking space used in web pages.
The third party add-in Kutools for Excel can help remove all the leading and trailing spaces quickly in Excel.
Kutools for Excel: with more than 60 handy Excel add-ins, free to try with no limitation in 30days. Get it Now.
Compare with the trim function in Excel, the Removing spaces utility in Kutools for Excel provides more flexible way to remove all the excessive space in Excel. You can directly remove the space in the cell without moving them into other cells. More important, you can remove other kind of space in the cell, such as all excess space, all space and so on.
Step 1: Select the cells that you want to modify. You can select some columns, rows or the entire worksheet.
Step 2: Click Kutools > Text Tools > Remove Spaces > Leading and Trailing Spaces…See screenshot (Fig. 2).
Step 3: Click OK to apply it.
|Fig.2 Remove spaces in Kutools for Excel|