Friday, August 19, 2016

How to remove trailing spaces from cells in Microsoft Excel?

Sometime we may add unwanted spaces in Excel cells, which are not easy to find out but affect sorting, calculating, or others. This article will introduce several methods to remove trailing spaces after text strings of cells in Microsoft Excel.

arrow blue right bubble 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.
Step 1: Select the range in which you want to remove trailing spaces from cells.
Step 2: Hold down the ALT + F11 keys, and it opens the Microsoft Visual Basic for Applications window.
Step 3: Click Insert > Module, and paste the following macro in the Module Window.
Sub NoSpaces()
Dim c As Range
For Each c In Selection.Cells
c = Trim(c)
Next
End Sub
Step 4: Press the F5 key to run this macro. And all of the trailing spaces of the selection will be removed.

arrow blue right bubble Remove trailing spaces from cells in Excel with Kutools for Excel

Maybe you are not familiar with Microsoft Excel's Macros, and need time to study it. Please do not worry about it. The second method is provided by a third-party add-in, Kutools for Excel. Its Remove Spaces tool can help you remove trailing spaces from cells quickly.
Kutools for Excel includes more than 120 handy Excel tools. Free to try with no limitation in 30 days. Get it Now.
Step 1: Select the range in which you want to remove all trailing spaces from cells.
Step 2: Click the Kutools > Text Tools > Remove Spaces. See screenshot:
doc-remov-trailing-spaces1
Step 3: In Remove Spaces dialog box, check the Trailing Spaces option in Spaces Type section. See screenshot:
doc-remov-trailing-spaces2
Step 4: Click OK or Apply. And all the trailing spaces after the text string have been removed. See screenshot:
doc-remov-trailing-spaces3 -2 doc-remov-trailing-spaces4
Kutools for Excel's Remove Spaces tool makes it possible to delete all kinds of spaces from strings in cells, including all extra spaces, leading spaces, trailing spaces, or all spaces. Click to know more...



15 comments:

  1. Chaos Theatre: How To Remove Trailing Spaces From Cells In Microsoft Excel? >>>>> Download Now

    >>>>> Download Full

    Chaos Theatre: How To Remove Trailing Spaces From Cells In Microsoft Excel? >>>>> Download LINK

    >>>>> Download Now

    Chaos Theatre: How To Remove Trailing Spaces From Cells In Microsoft Excel? >>>>> Download Full

    >>>>> Download LINK

    ReplyDelete

Blogger Tips And Tricks|Latest Tips For Bloggers Free Backlinks