Search

Microsoft Excel How to remove extra/Leading spaces in excel

How to Remove Leading Spaces in Microsoft Excel

remove space in excel

Copying text in Microsoft Excel is often annoying, and it’s tedious to manually remove trailing, leading, and any other extra spaces from cells in your spreadsheet. Fortunately, Excel has two features to remove them easily.

Table of Contentshow to delete whitespace in excel

In Excel, to remove leading, trailing and extra spaces between words in a particular string, use the TRIM function. This function removes all spaces except single spaces between words.

To remove all spaces, including spaces between words, use Excel’s Replace feature. You can do this quickly across your entire spreadsheet, or narrow it down to a specific area.

Remove Leading, Trailing and Extra Spaces in Excel

To start removing leading, trailing, and extra spaces from your cells, first, open your spreadsheet with Microsoft Excel. We will be using the following spreadsheet which will have additional spaces.
remove spaces in excel

Select the cell next to the first record in your spreadsheet. This is where your text will appear without the extra space.

remove space excel

In the selected cell, type the following TRIM function and press Enter. In the function, replace B2 with the cell where your first record is.=TRIM(B2)

excel remove spaces

From the lower-right corner of where you typed the TRIM function, drag down to copy the formula to all of your records.

space remove in excel

You now have your text in your spreadsheet without any extra spaces.

how to remove space in excel

Are there any duplicate rows in your spreadsheet? If so, removing them is easy. RELATED: How to Remove Duplicate Rows in Excel How to Remove All Spaces in Excel

To get rid of all the spaces from your spreadsheet, use Excel’s Replace feature as follows. First, open your spreadsheet and select the cells you want to remove spaces from.
excel remove space
In Excel’s ribbon at the top, click the “Home” tab.excel Menu option

In the “Home” tab, from the “Editing” section, select the “Find and Select” option.

Excel find and replace option

From the expanded menu, select “Replace”.

removing space in excel by replace option
Excel will open a “Find and Replace” window. Here, click on the “Find what” box and type a space. Leave the “Replace with” field blank. Then click “Replace All” at the bottom of the window.how to remove spaces in excel before text
Excel will find and remove all spaces from your worksheet. Tip: If you think you’ve made a mistake, quickly bring back your blanks by pressing Ctrl+Z on Windows or Command+Z on Mac.how to remove extra spaces in excel

And that’s how you keep your entries neat and tidy by removing any unwanted whitespace! Need to remove blank rows or columns from your Excel spreadsheets? There are easy ways to do this.

Share this article :
Facebook
Twitter
LinkedIn

Leave a Reply