Title: 4 Ways to Remove Unwanted Space Characters | How To Excel
Headings: 4 Ways to Remove Unwanted Space Characters
4 Ways to Remove Unwanted Space Characters
Table of Contents
Our Example Data for the Post
Removing Extra Spaces with the TRIM Function
Removing Extra Spaces Between Words with Find and Replace
Removing Extra Spaces with Power Query
Removing Extra Spaces Between Words With VBA
Conclusions
Subscribe
Consulting
Excel Insights
Excel Functions eBook
Microsoft MVP
Categories
Advertisement

Content: Removing Extra Spaces with the TRIM Function
The first method we’ll look at is the simplest. Extra spaces is such a common problem, that there’s a function to remove (or trim) them. It’s the TRIM function. It does exactly what it sounds like it might do. It trims off any excessive spaces from the data. It removes all spaces from a text string except for single spaces between words. The TRIM function has one required input, and this is the text from which we want to trim off excess spaces. The input can either be a cell reference like B2 or a hardcoded string like ” Hello World! “. TRIM (B2) would return the contents of cell B2 with extra spaces removed. TRIM (" Hello World! ")