Title: Remove Trailing Spaces from Cells in Excel - Free Excel Tutorial
Headings: Remove Trailing Spaces from Cells in Excel
Remove Trailing Spaces from Cells in Excel
Remove Trailing Spaces from Cells with Formula
Remove Trailing Spaces from Cells with VBA Macro
Related Functions

Content: B4 contain text string values, and you want to strip all leading and trailing spaces in the given range of cells, how to achieve it. You can use the following formula. = TRIM (B1)
Type this formula into a blank cell and then press Enter key, and drag the AutoFill Handle over other cells to apply this formula. This formula will remove both leading and trailing spaces from text string in cells. Remove Trailing Spaces from Cells with VBA Macro
You can also use an Excel VBA Macro to remote all trailing spaces from a given range of cells. Just do the following steps: #1 select one range of cells that you want to remove trailing spaces
#2 open your excel workbook and then click on “ Visual Basic ” command under DEVELOPER Tab, or just press “ ALT+F11 ” shortcut. #3 then the “ Visual Basic Editor ” window will appear. #4 click “ Insert ” ->” Module ” to create a new module. #5 paste the below VBA code into the code window.