Title: How to remove trailing spaces from cells in Microsoft Excel?
Headings: How to remove trailing spaces from cells in Microsoft Excel?
How to remove trailing spaces from cells in Microsoft Excel?
Remove trailing spaces from cells in Excel with VBA
Remove trailing spaces from cells in Excel with Kutools for Excel
Remove trailing spaces from cells in Excel with VBA
VBA code: Remove all trailing spaces from selected cells in Excel
Remove trailing spaces from cells in Excel with Kutools for Excel
Demo: Remove trailing spaces from selected cells with Kutools for Excel
The Best Office Productivity Tools
Kutools for Excel Solves Most of Your Problems, and Increases Your Productivity by 80%
Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier

Content: Remove trailing spaces from cells in Excel with VBA
Remove trailing spaces from cells in Excel with Kutools for Excel
Remove trailing spaces from cells in Excel with VBA
Using the Trim function is easy to remove the trailing space in one cell, but time-consuming to remove trailing spaces in many cells. Here provides a macro to remove all trailing spaces of all cells in a selection. 1: Select the range you want to remove trailing spaces from cells. 2. Press the ALT + F11 keys to open the Microsoft Visual Basic for Applications window. 3. Click Insert > Module, and paste the following macro in the Module Window. VBA code: Remove all trailing spaces from selected cells in Excel
1
2
3
4
5
6
7
Sub NoSpaces ()
Dim c As Range
For Each c In Selection.