How to remove extra spaces between words in cells in Excel?
When you import data in Excel from an external data source, it often comes with some extra spaces. If you don’t want the unnecessary spaces, how do you remove them? In this article, I will introduce you some ways to remove extra spaces between words in cells.
In Excel, you can remove extra spaces between words with TRIM. Please do as follows:
Step 1. Type formula =TRIM(A1) in cell B1 which is adjacent to cell A1, see screenshot:
Step 2. Press Enter key and select B1, then drag the fill handle over the range of cells that you want to apply this formula. And all extra spaces between characters have been removed from the range. See screenshot:
Tip-: 1. As they are formulas, so when you copy and paste them to other places, you need to paste them as values.
Remove extra spaces between words with VBA
With VBA, you also can remove extra spaces between words.
1. Hold ALT button and press F11 on the keyboard to open a Microsoft Visual Basic for Application window.
2. Click Insert > Module, and copy the VBA into the module.
VBA: Remove extra spaces between words:
Dim Rng As Range
Dim WorkRng As Range
On Error Resume Next
xTitleId = "KutoolsforExcel"
Set WorkRng = Application.Selection
Set WorkRng = Application.InputBox("Range", xTitleId, WorkRng.Address, Type:=8)
For Each Rng In WorkRng
Rng.Value = Application.WorksheetFunction.Trim(Rng.Value)
3. Click Run button or press F5 key to run the VBA. And a prompt box will pop out to remind you select the range that you want to remove the excess spaces, see screenshot:
4. Then click OK, the extra spaces have been removed from the cells. See screenshot:
Remove extra spaces between words with Kutools for Excel
Have Kutools for Excel installed, with Remove Spaces function, you can remove extra spaces between words quickly and easily.
Select Duplicate or Unique Rows; Select Blank Rows (all cells are empty); Super Find and Fuzzy Find in Many Workbooks; Random Select...
Exact Copy Multiple Cells without changing formula reference; Auto Create References to Multiple Sheets; Insert Bullets, Check Boxes and more...
Extract Text, Add Text, Remove by Position, Remove Space; Create and Print Paging Subtotals; Convert Between Cells Content and Comments...
Super Filter (save and apply filter schemes to other sheets); Advanced Sort by month/week/day, frequency and more; Special Filter by bold, italic...
Combine Workbooks and WorkSheets; Merge Tables based on key columns; Split Data into Multiple Sheets; Batch Convert xls, xlsx and PDF...
More than 300 powerful features. Supports Office/Excel
2007-2019 and 365. Supports all languages. Easy deploying in your enterprise or organization. Full features
30-day free trial. 60-day money back guarantee.
I have created characters using private character editor,I have created the characters in the middle of the screen,when assigned each character to button,found a huge gap between each character,how to reduce the spaces between characters,any way to resize the characters removing the extra space in each character else I need to design all again.