How To Remove Blank Spaces In Excel
The trim function below removes 2 leading spaces 3 extra spaces and 2 trailing spaces.
How to remove blank spaces in excel. Sometimes all the information is there but extra blanks and spaces are carried along with the data cells. In the replace with field type one space. The trim function then takes over to remove extra spaces and returns the final text.
Keep pressing the replace all button until all extra. Remove leading and trailing spaces trim. There we need to put a space and replace that with blank nothing kept.
Click insert module to create a new module script copy and paste below code to the script. Select the cell or range of cells from which you want to remove white spaces. In the find and replace dialog and under the replace tab type one space into the find what textbox keep the replace with textbox empty and then click the replace all button.
Select the cells range entire column or row where you want to delete extra spaces. If you also need to remove line breaks from cells you can add the clean function like so. Trim clean text the clean function removes a range of non printing characters including line breaks and returns cleaned text.
The first way we can remove the extra unwanted spaces with the help of find and replace option ctrl h. And now whenever you want to remove blank spaces in your excel sheets perform these 4 quick steps. The trim function in excel removes leading spaces extra spaces and trailing spaces.
Using the search and replace short cut key. Use the shortcut key. Select the cells containing spaces you will remove press the ctrl h keys to open the find and replace dialog box.