Excel Trim Spaces

Use the substitute function to remove all spaces or non breaking spaces.
Excel trim spaces. Press ctrl space to select all cells in a column. The trim function in excel removes leading spaces extra spaces and trailing spaces. In the above mentioned table you can observe in the a column i e. Trim is useful when cleaning up text that has come from other applications or environments.
Press space bar in the find what field and make sure the replace with field is empty. Us state data which contains only leading spaces. The text from a4 with extra spaces will appear in a6 but with all of the extra spaces removed. The easiest way to get rid of excess spaces is using the standard excel find replace option.
Finally replace the values in the original column with. How to trim spaces in an entire column of data write a trim formula for the topmost cell a2 in our example. Remove all extra spaces from strings with the trim function 2 steps. If you want to convert or import all data.
The trim function below removes 2 leading spaces 3 extra spaces and 2 trailing spaces. Apply trim function in the cell a2 i e. Click on cell a6 to make it the active cell this is where the function will go. The excel trim function strips extra spaces from text leaving only a single space between words and no space characters at the start or end of the text.
Press enter key to get the result then. Trim only removes the ascii space character 32 from text. To remove extra spaces with the trim function follow this procedure. Trim a2 position the cursor to the lower right corner of the formula cell b2 in this example and as soon as the cursor turns.
Trim strips extra spaces from text leaving only single spaces between words and no space characters at the start or end of the text. How to remove leading and trailing spaces in excel cells.