We can use the Excel TRIM function to remove extra spaces from a text. This allows us to have only single spaces between words, with no space characters at the start or end of a text. This post provides an elaborate method of how to use the Excel TRIM function to removes the extra spaces.
Figure 1: Using TRIM function to remove extra spaces
General syntax of the formula
=TRIM (text)
Where;
- Text- refers to the text which we want to remove the extra spaces
How the formula works
- The TRIM function is fundamental when we have text that has extra spaces in between words.
- What this function does is to remove these extra spaces and return words without the extra spaces at the beginning or end of text.
- This function only removes the ASCII spaces character
- It cannot eliminate spaces from a Unicode text
In the example above, we want to remove all the unnecessary spaces from the text in column A. to do this, we shall need to have the result displayed in column B.
We specify our formula in cell B2 as “=TRIM (A2)
” and simply press Enter. This removes the extra spaces.
We then copy down the formula to “trim” the spaces from the text in the other cells.
Instant Connection to an Expert through our Excelchat Service
Most of the time, the problem you will need to solve will be more complex than a simple application of a formula or function. If you want to save hours of research and frustration, try our live Excelchat service! Our Excel Experts are available 24/7 to answer any Excel question you may have. We guarantee a connection within 30 seconds and a customized solution within 20 minutes.
Leave a Comment