Remove Spaces In Excel After Text

Remove whitespace with kutools for excel.
Remove spaces in excel after text. In cell b1 type substitute and go to formulas tab click on insert function option in excel to open the function dialog box. If you also need to remove line breaks from cells you can add the clean function like so. The trim function in excel removes leading spaces extra spaces and trailing spaces. Use the substitute function to remove all spaces or non breaking spaces.
Click replace and then the spaces in the cell have been removed. The trim function is relatively straightforward. Simply give it some text and it removes all spaces from the text except for single spaces between words. Trim a2 where a2 is the cell you want to delete spaces from.
And now you only need to replace values in the original column with trimmed values. Remove extra whitespace trim a2 if you want to remove all whitespaces select the cell you use press ctrl h to enable find and replace dialog type a space in the find what text box and leave nothing in replace with text box. Select the entire column you want to clean. The trim function then takes over to remove extra spaces and returns the final text.
The trim function below removes 2 leading spaces 3 extra spaces and 2 trailing spaces. Select a cell next to the cell you want to remove extra spaces from string type this formula. The text we want is from cell a1 so in text select a1. The excel trim function removes all spaces from text except a single space between words.
Press the ctrl h shortcut to open excel s search and replace window. As shown in the following screenshot the excel trim formula successfully eliminated all spaces before and after the text as well as consecutive spaces in the middle of a string. The figure illustrates how you can remove superfluous spaces by using the trim function. In the formulas tab click the text drop down menu in the functions section and select trim.
Press enter key to get the result then drag auto fill handle over the cells you want to remove extra spaces from all of leading spaces and trailing spaces and extra spaces have been removed. If the text in your column has extra spaces within the text not right before or right after you can quickly clean that text by using excel s search and replace feature. In the new text type which means no spaces then click on ok. In the find what field type two spaces.
We want to remove extra spaces so in old text box type which means space. Remove all characters after the first space select a blank cell enter the formula left a2 find a2 1 a2 is the cell where you will remove all characters after the first space into it and the drag the fill handle down to the range as you need.