Question: how to trim blank space in excel

How to remove blank spaces in Excel - leading, trailing, non-breaking How to remove spaces in Excel - leading, trailing, non-breaking
How to remove spaces in Excel - leading, trailing, non-breaking
How to remove blank spaces in Excel - leading, trailing, between words
=TRIM (A2)
How to delete line breaks and nonprinting characters
=TRIM (CLEAN (A2))
How to remove non-breaking spaces in Excel
=TRIM (SUBSTITUTE (A2, CHAR (160), " "))
=TRIM (CLEAN ( (SUBSTITUTE (A2,CHAR (160)," "))))
How to delete a specific non-printing character
=TRIM (SUBSTITUTE (SUBSTITUTE (A2, CHAR (127), " "), CHAR (160), " ")))
How to remove all spaces in Excel
=SUBSTITUTE (A2, CHAR (32), "")
=SUBSTITUTE (A2," ","")
How to count spaces in Excel
=LEN (A2)-LEN (SUBSTITUTE (A2," ",""))
=LEN (A2)-LEN (TRIM (A2))
Formula-free way to remove spaces and clean data
You may also be interested in
 There are several ways to remove spaces from string, and this tutorial will help you choose the technique best suited for your particular task and the data type you are working with. Remove spaces in Excel (leading, trailing, extra spaces between words)
Delete line breaks and non-printing characters
Remove non-breaking spaces ( )
Delete a specific non-printing character
How to remove all spaces in Excel
How to count spaces in Excel
Text Toolkit - quick way to trim spaces and clean data
How to remove blank spaces in Excel - leading, trailing, between words
If your data set contains superfluous spaces, the Excel TRIM function can help you delete them all in one go - leading, trailing and multiple in-between spaces, except for a single space character between words. A regular TRIM formula is as simple as this: =TRIM (A2)
Where A2 is the cell you want to delete spaces from. 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. And now, you only need to replace values in the original column with trimmed values. The easiest way to do this is using Paste Special > Values, the detailed instructions can be found here: How to copy values in Excel. Additionally, you can use the Excel TRIM function to remove leading spaces only, keeping all spaces in the middle of a text string intact. The formula example is here:

How to remove blank spaces in Excel - leading, trailing, non-breaking

How to remove spaces in Excel - leading, trailing, non-breaking
How to remove spaces in Excel - leading, trailing, non-breaking
How to remove blank spaces in Excel - leading, trailing, between words
=TRIM (A2)
How to delete line breaks and nonprinting characters
=TRIM (CLEAN (A2))
How to remove non-breaking spaces in Excel
=TRIM (SUBSTITUTE (A2, CHAR (160), " "))
=TRIM (CLEAN ( (SUBSTITUTE (A2,CHAR (160)," "))))
How to delete a specific non-printing character
=TRIM (SUBSTITUTE (SUBSTITUTE (A2, CHAR (127), " "), CHAR (160), " ")))
How to remove all spaces in Excel
=SUBSTITUTE (A2, CHAR (32), "")
=SUBSTITUTE (A2," ","")
How to count spaces in Excel
=LEN (A2)-LEN (SUBSTITUTE (A2," ",""))
=LEN (A2)-LEN (TRIM (A2))
Formula-free way to remove spaces and clean data
You may also be interested in

Remove extra spaces in Excel 2016 - 2007 with Ultimate Suite Remove extra spaces in Excel
Remove extra spaces in Excel
Before you start
How to trim spaces in the range
 Remove extra spaces in Excel 2016 - 2007 with Ultimate Suite
Remove extra spaces in Excel
If extra spaces in your Excel worksheet don't let process your data correctly, use text tools from Ultimate Suite for Excel. It will help you remove leading and trailing spaces or get rid of excess blanks between words. Here you will learn how to remove spaces in Excel 2016 - 2007. Before you start
How to trim spaces in the range
Related links
Before you start
We care about your data. The add-in will back up your file if you select the corresponding option. How to trim spaces in the range
To run the needed tool, click the Trim Spaces icon in the Text group on the Ablebits Data tab: Then simply pick the needed options: Select the range where you want to remove extra spaces in your Excel worksheet. If you want to highlight the whole table quickly, click the Expand selection icon. Choose the option or a combination of options that suits you best:

Remove extra spaces in Excel 2016 - 2007 with Ultimate Suite

Remove extra spaces in Excel
Remove extra spaces in Excel
Before you start
How to trim spaces in the range

Remove extra spaces in Excel 2016 - 2007 with Ultimate Suite
Remove extra spaces in Excel
If extra spaces in your Excel worksheet don't let process your data correctly, use text tools from Ultimate Suite for Excel. It will help you remove leading and trailing spaces or get rid of excess blanks between words. Here you will learn how to remove spaces in Excel 2016 - 2007. Before you start
How to trim spaces in the range
Related links
Before you start
We care about your data. The add-in will back up your file if you select the corresponding option. How to trim spaces in the range
To run the needed tool, click the Trim Spaces icon in the Text group on the Ablebits Data tab: Then simply pick the needed options: Select the range where you want to remove extra spaces in your Excel worksheet. If you want to highlight the whole table quickly, click the Expand selection icon. Choose the option or a combination of options that suits you best:

How to remove blank spaces in Excel - leading, trailing, non-breaking How to remove spaces in Excel - leading, trailing, non-breaking
How to remove spaces in Excel - leading, trailing, non-breaking
How to remove blank spaces in Excel - leading, trailing, between words
=TRIM (A2)
How to delete line breaks and nonprinting characters
=TRIM (CLEAN (A2))
How to remove non-breaking spaces in Excel
=TRIM (SUBSTITUTE (A2, CHAR (160), " "))
=TRIM (CLEAN ( (SUBSTITUTE (A2,CHAR (160)," "))))
How to delete a specific non-printing character
=TRIM (SUBSTITUTE (SUBSTITUTE (A2, CHAR (127), " "), CHAR (160), " ")))
How to remove all spaces in Excel
=SUBSTITUTE (A2, CHAR (32), "")
=SUBSTITUTE (A2," ","")
How to count spaces in Excel
=LEN (A2)-LEN (SUBSTITUTE (A2," ",""))
=LEN (A2)-LEN (TRIM (A2))
Formula-free way to remove spaces and clean data
You may also be interested in
 Of course, learning a handful of formulas is a good exercise to sharpen your skills, but it might be time-consuming. Excel users who value their time and appreciate convenience can take advantage of the Text Tools included with our Ultimate Suite for Excel. One of these handy tools allows removing spaces and non-printing characters in a button click. Once installed, Ultimate Suite adds several useful buttons to your Excel ribbon such as Trim Spaces, Remove Characters, Convert Text, Clear Formatting, and a few more. Whenever you want to remove blank spaces in your Excel sheets, perform these 4 quick steps: Select the cells (range, entire column or row) where you want to delete extra spaces. Click the Trim Spaces button on the Ablebits Data tab. Choose one or several options: Remove leading and trailing spaces
Trim extra spaces between words to one
Delete non-breaking spaces ( )
Click the Trim button. Done!

Of course, learning a handful of formulas is a good exercise to sharpen your skills, but it might be time-consuming. Excel users who value their time and appreciate convenience can take advantage of the Text Tools included with our Ultimate Suite for Excel. One of these handy tools allows removing spaces and non-printing characters in a button click. Once installed, Ultimate Suite adds several useful buttons to your Excel ribbon such as Trim Spaces, Remove Characters, Convert Text, Clear Formatting, and a few more. Whenever you want to remove blank spaces in your Excel sheets, perform these 4 quick steps: Select the cells (range, entire column or row) where you want to delete extra spaces. Click the Trim Spaces button on the Ablebits Data tab. Choose one or several options: Remove leading and trailing spaces
Trim extra spaces between words to one
Delete non-breaking spaces ( )
Click the Trim button. Done!

Remove extra spaces in Excel 2016 - 2007 with Ultimate Suite Remove extra spaces in Excel
Remove extra spaces in Excel
Before you start
How to trim spaces in the range
 How to trim spaces in the range
To run the needed tool, click the Trim Spaces icon in the Text group on the Ablebits Data tab: Then simply pick the needed options: Select the range where you want to remove extra spaces in your Excel worksheet. If you want to highlight the whole table quickly, click the Expand selection icon. Choose the option or a combination of options that suits you best: If you pick Trim leading/trailing spaces, the spaces before and after cell values will be deleted. By ticking Trim spaces between words to 1, you'll have extra spaces between words within a cell removed. The Trim ' ' option means that non-breaking spaces that look like   in your worksheet will be deleted from the selected range. Tip. You can run any of these options right away by clicking the down arrow below the add-in's icon and picking the necessary option from the drop-down menu:

How to trim spaces in the range
To run the needed tool, click the Trim Spaces icon in the Text group on the Ablebits Data tab: Then simply pick the needed options: Select the range where you want to remove extra spaces in your Excel worksheet. If you want to highlight the whole table quickly, click the Expand selection icon. Choose the option or a combination of options that suits you best: If you pick Trim leading/trailing spaces, the spaces before and after cell values will be deleted. By ticking Trim spaces between words to 1, you'll have extra spaces between words within a cell removed. The Trim ' ' option means that non-breaking spaces that look like   in your worksheet will be deleted from the selected range. Tip. You can run any of these options right away by clicking the down arrow below the add-in's icon and picking the necessary option from the drop-down menu:

How to Remove Leading Blank Spaces in Excel | Small Business - Chron.com How to Remove Leading Blank Spaces in Excel
How to Remove Leading Blank Spaces in Excel
1
2
3
4
5
 2
Type "TRIM (" – without quotation marks – and click on the location of the first cell in the column that contains data you want to clean up. Type a closing parenthesis to complete the formula. Press the "Enter" key. 3
Click on the bottom-right corner of the cell into which you typed your formula. When your cursor changes to a black plus sign, click and drag downward until you reach and fill the cell in the same row as the last value in the column of data you're tidying up. 4
Click on the header of the column to select the calculated values that result from your TRIM function. Press "Ctrl-C" to copy the data. 5
Click on the header of the column that contains the data you just cleaned up. Click on the Home tab of the Excel Ribbon and locate its Clipboard group. Click on the arrow below "Paste" and choose "Paste Special."

How to Remove Leading Blank Spaces in Excel | Small Business - Chron.com

How to Remove Leading Blank Spaces in Excel
How to Remove Leading Blank Spaces in Excel
1
2
3
4
5

2
Type "TRIM (" – without quotation marks – and click on the location of the first cell in the column that contains data you want to clean up. Type a closing parenthesis to complete the formula. Press the "Enter" key. 3
Click on the bottom-right corner of the cell into which you typed your formula. When your cursor changes to a black plus sign, click and drag downward until you reach and fill the cell in the same row as the last value in the column of data you're tidying up. 4
Click on the header of the column to select the calculated values that result from your TRIM function. Press "Ctrl-C" to copy the data. 5
Click on the header of the column that contains the data you just cleaned up. Click on the Home tab of the Excel Ribbon and locate its Clipboard group. Click on the arrow below "Paste" and choose "Paste Special."

3 ways to remove spaces between words / numbers in Excel cells 3 ways to remove spaces between words / numbers in Excel cells
3 ways to remove spaces between words / numbers in Excel cells
Trim blanks between words to 1, remove trailing / leading spaces
Use the Trim formula to remove extra spaces
Using Find & Replace to remove extra spaces between words
3 clicks to neat data with Trim Spaces tool
Remove all spaces between numbers
Using formula to remove all spaces
Video: how to remove spaces in Excel
You may also be interested in
 Consequently, your table looks disorderly and becomes difficult to use. It may be a challenge to find a customer in the Name column since you search for "John Doe" which has no excess spaces between the names while the way it looks in your table is "John Doe". Or numbers can't be summed up, and again extra blanks are the ones to blame. In this article you'll find how to clean up your data. Trim blanks between words to 1, remove trailing / leading spaces
Using trim formula
Employ the Find & Replace option
3 clicks to neat data with Trim Spaces tool
Remove All spaces between numbers or words
Video: how to remove spaces in Excel
Trim blanks between words to 1, remove trailing / leading spaces
For example, you have a table with 2 columns. In the column Name, the first cell contains "John Doe" written correctly without excess spaces. All other cells have extra blanks between the first and the last names. At the same time these cells have irrelevant blanks before and after the full names known as leading and trailing spaces. The second column is called Length and shows the number of symbols in each name:

3 ways to remove spaces between words / numbers in Excel cells

3 ways to remove spaces between words / numbers in Excel cells
3 ways to remove spaces between words / numbers in Excel cells
Trim blanks between words to 1, remove trailing / leading spaces
Use the Trim formula to remove extra spaces
Using Find & Replace to remove extra spaces between words
3 clicks to neat data with Trim Spaces tool
Remove all spaces between numbers
Using formula to remove all spaces
Video: how to remove spaces in Excel
You may also be interested in

Consequently, your table looks disorderly and becomes difficult to use. It may be a challenge to find a customer in the Name column since you search for "John Doe" which has no excess spaces between the names while the way it looks in your table is "John Doe". Or numbers can't be summed up, and again extra blanks are the ones to blame. In this article you'll find how to clean up your data. Trim blanks between words to 1, remove trailing / leading spaces
Using trim formula
Employ the Find & Replace option
3 clicks to neat data with Trim Spaces tool
Remove All spaces between numbers or words
Video: how to remove spaces in Excel
Trim blanks between words to 1, remove trailing / leading spaces
For example, you have a table with 2 columns. In the column Name, the first cell contains "John Doe" written correctly without excess spaces. All other cells have extra blanks between the first and the last names. At the same time these cells have irrelevant blanks before and after the full names known as leading and trailing spaces. The second column is called Length and shows the number of symbols in each name:

3 ways to remove spaces between words / numbers in Excel cells 3 ways to remove spaces between words / numbers in Excel cells
3 ways to remove spaces between words / numbers in Excel cells
Trim blanks between words to 1, remove trailing / leading spaces
Use the Trim formula to remove extra spaces
Using Find & Replace to remove extra spaces between words
3 clicks to neat data with Trim Spaces tool
Remove all spaces between numbers
Using formula to remove all spaces
Video: how to remove spaces in Excel
You may also be interested in
 Leading and trailing spaces will also be trimmed to 1, but will not be removed. Select one or several columns with the data to delete spaces between words. Press Ctrl + H to get the " Find and Replace " dialog box. Press the Space bar twice in the Find What field and once in Replace With
Click on the " Replace all " button, and then press Ok to close Excel confirmation dialog. Repeat step 4 until you see the message "We couldn't find anything to replace." :) 3 clicks to neat data with Trim Spaces tool
If you often import data to Excel from external sources and spend much time polishing up your tables, check out our Text tools for Excel. The Trim Spaces add-in will clean data imported from the web or any other external source. It removes leading and trailing spaces, excess blanks between words, non-breaking spaces, line breaks, non-printing symbols and other unwanted characters. Also, there is an option to convert words to UPPER, lower or Proper Case. And if you need to change text numbers back to the number format and delete apostrophes, this will not be a problem either.

Leading and trailing spaces will also be trimmed to 1, but will not be removed. Select one or several columns with the data to delete spaces between words. Press Ctrl + H to get the " Find and Replace " dialog box. Press the Space bar twice in the Find What field and once in Replace With
Click on the " Replace all " button, and then press Ok to close Excel confirmation dialog. Repeat step 4 until you see the message "We couldn't find anything to replace." :) 3 clicks to neat data with Trim Spaces tool
If you often import data to Excel from external sources and spend much time polishing up your tables, check out our Text tools for Excel. The Trim Spaces add-in will clean data imported from the web or any other external source. It removes leading and trailing spaces, excess blanks between words, non-breaking spaces, line breaks, non-printing symbols and other unwanted characters. Also, there is an option to convert words to UPPER, lower or Proper Case. And if you need to change text numbers back to the number format and delete apostrophes, this will not be a problem either.

3 ways to remove spaces between words / numbers in Excel cells 3 ways to remove spaces between words / numbers in Excel cells
3 ways to remove spaces between words / numbers in Excel cells
Trim blanks between words to 1, remove trailing / leading spaces
Use the Trim formula to remove extra spaces
Using Find & Replace to remove extra spaces between words
3 clicks to neat data with Trim Spaces tool
Remove all spaces between numbers
Using formula to remove all spaces
Video: how to remove spaces in Excel
You may also be interested in
 Use the Trim formula to remove extra spaces
Excel has the Trim formula to use for deleting extra spaces from text. Below you can find the steps showing how to use this option: Add the helper column to the end of your data. You can name it "Trim". In the first cell of the helper column ( C2 ), enter the formula to trim excess spaces =TRIM (A2)
Copy the formula across the other cells in the column. Feel free to use some tips from Enter the same formula into all selected cells at a time. Replace the original column with the one that has the cleaned data. Select all cells in the helper column and press Ctrl + C to copy data to clipboard. Now pick the first cell in the original column and press Shift + F10 or the menu button . Then just press V.
Remove the helper column.

Use the Trim formula to remove extra spaces
Excel has the Trim formula to use for deleting extra spaces from text. Below you can find the steps showing how to use this option: Add the helper column to the end of your data. You can name it "Trim". In the first cell of the helper column ( C2 ), enter the formula to trim excess spaces =TRIM (A2)
Copy the formula across the other cells in the column. Feel free to use some tips from Enter the same formula into all selected cells at a time. Replace the original column with the one that has the cleaned data. Select all cells in the helper column and press Ctrl + C to copy data to clipboard. Now pick the first cell in the original column and press Shift + F10 or the menu button . Then just press V.
Remove the helper column.

3 ways to remove spaces between words / numbers in Excel cells 3 ways to remove spaces between words / numbers in Excel cells
3 ways to remove spaces between words / numbers in Excel cells
Trim blanks between words to 1, remove trailing / leading spaces
Use the Trim formula to remove extra spaces
Using Find & Replace to remove extra spaces between words
3 clicks to neat data with Trim Spaces tool
Remove all spaces between numbers
Using formula to remove all spaces
Video: how to remove spaces in Excel
You may also be interested in
 To remove all extra spaces in your worksheet, including excess paces between words, this is what you need to do: Download and install a trial version of Ultimate Suite for Excel. Select the range in your table where you want to remove excess spaces. For new tables, I usually press Ctrl + A to process all columns in a go. Go to Ablebits Data tab and click on the Trim Spaces icon. The add-in's pane will open on the left side of your worksheet. Just select the needed checkboxes, click the Trim button and enjoy your perfectly cleaned table. Isn't it faster than with the two previous tips? If you always deal with data processing, this tool will save you hours of precious time. Want to get this and 300+ other helpful features for your Excel?

To remove all extra spaces in your worksheet, including excess paces between words, this is what you need to do: Download and install a trial version of Ultimate Suite for Excel. Select the range in your table where you want to remove excess spaces. For new tables, I usually press Ctrl + A to process all columns in a go. Go to Ablebits Data tab and click on the Trim Spaces icon. The add-in's pane will open on the left side of your worksheet. Just select the needed checkboxes, click the Trim button and enjoy your perfectly cleaned table. Isn't it faster than with the two previous tips? If you always deal with data processing, this tool will save you hours of precious time. Want to get this and 300+ other helpful features for your Excel?

3 ways to remove spaces between words / numbers in Excel cells 3 ways to remove spaces between words / numbers in Excel cells
3 ways to remove spaces between words / numbers in Excel cells
Trim blanks between words to 1, remove trailing / leading spaces
Use the Trim formula to remove extra spaces
Using Find & Replace to remove extra spaces between words
3 clicks to neat data with Trim Spaces tool
Remove all spaces between numbers
Using formula to remove all spaces
Video: how to remove spaces in Excel
You may also be interested in
 how to remove spaces in Excel
Trim blanks between words to 1, remove trailing / leading spaces
For example, you have a table with 2 columns. In the column Name, the first cell contains "John Doe" written correctly without excess spaces. All other cells have extra blanks between the first and the last names. At the same time these cells have irrelevant blanks before and after the full names known as leading and trailing spaces. The second column is called Length and shows the number of symbols in each name: Use the Trim formula to remove extra spaces
Excel has the Trim formula to use for deleting extra spaces from text. Below you can find the steps showing how to use this option: Add the helper column to the end of your data. You can name it "Trim". In the first cell of the helper column ( C2 ), enter the formula to trim excess spaces =TRIM (A2)
Copy the formula across the other cells in the column.

how to remove spaces in Excel
Trim blanks between words to 1, remove trailing / leading spaces
For example, you have a table with 2 columns. In the column Name, the first cell contains "John Doe" written correctly without excess spaces. All other cells have extra blanks between the first and the last names. At the same time these cells have irrelevant blanks before and after the full names known as leading and trailing spaces. The second column is called Length and shows the number of symbols in each name: Use the Trim formula to remove extra spaces
Excel has the Trim formula to use for deleting extra spaces from text. Below you can find the steps showing how to use this option: Add the helper column to the end of your data. You can name it "Trim". In the first cell of the helper column ( C2 ), enter the formula to trim excess spaces =TRIM (A2)
Copy the formula across the other cells in the column.

How to Remove Leading Blank Spaces in Excel | Small Business - Chron.com How to Remove Leading Blank Spaces in Excel
How to Remove Leading Blank Spaces in Excel
1
2
3
4
5
 How to Remove Leading Blank Spaces in Excel | Small Business - Chron.com
How to Remove Leading Blank Spaces in Excel
Small Business
|
Accounting & Bookkeeping
|
Excel
By Elizabeth Mott
However carefully you monitor the data you enter and import into Microsoft Excel, and the output of formulas and functions that produce new values, it's easy to wind up with cells that contain one or more spaces as their first characters. You may see leading spaces like these in cells that hold the results of a process designed to split a first name from a last name in cells that contain both together. Removing these leading spaces – or trailing spaces that fall at the end of a cell's contents – requires an Excel function. 1
Click in the first cell of a blank column on your spreadsheet. Type an equal sign to signal Excel that the cell will contain a formula. 2
Type "TRIM (" – without quotation marks – and click on the location of the first cell in the column that contains data you want to clean up. Type a closing parenthesis to complete the formula. Press the "Enter" key. 3
Click on the bottom-right corner of the cell into which you typed your formula. When your cursor changes to a black plus sign, click and drag downward until you reach and fill the cell in the same row as the last value in the column of data you're tidying up.

How to Remove Leading Blank Spaces in Excel | Small Business - Chron.com
How to Remove Leading Blank Spaces in Excel
Small Business
|
Accounting & Bookkeeping
|
Excel
By Elizabeth Mott
However carefully you monitor the data you enter and import into Microsoft Excel, and the output of formulas and functions that produce new values, it's easy to wind up with cells that contain one or more spaces as their first characters. You may see leading spaces like these in cells that hold the results of a process designed to split a first name from a last name in cells that contain both together. Removing these leading spaces – or trailing spaces that fall at the end of a cell's contents – requires an Excel function. 1
Click in the first cell of a blank column on your spreadsheet. Type an equal sign to signal Excel that the cell will contain a formula. 2
Type "TRIM (" – without quotation marks – and click on the location of the first cell in the column that contains data you want to clean up. Type a closing parenthesis to complete the formula. Press the "Enter" key. 3
Click on the bottom-right corner of the cell into which you typed your formula. When your cursor changes to a black plus sign, click and drag downward until you reach and fill the cell in the same row as the last value in the column of data you're tidying up.

3 ways to remove spaces between words / numbers in Excel cells 3 ways to remove spaces between words / numbers in Excel cells
3 ways to remove spaces between words / numbers in Excel cells
Trim blanks between words to 1, remove trailing / leading spaces
Use the Trim formula to remove extra spaces
Using Find & Replace to remove extra spaces between words
3 clicks to neat data with Trim Spaces tool
Remove all spaces between numbers
Using formula to remove all spaces
Video: how to remove spaces in Excel
You may also be interested in
 3 clicks to neat data with Trim Spaces tool
If you often import data to Excel from external sources and spend much time polishing up your tables, check out our Text tools for Excel. The Trim Spaces add-in will clean data imported from the web or any other external source. It removes leading and trailing spaces, excess blanks between words, non-breaking spaces, line breaks, non-printing symbols and other unwanted characters. Also, there is an option to convert words to UPPER, lower or Proper Case. And if you need to change text numbers back to the number format and delete apostrophes, this will not be a problem either. To remove all extra spaces in your worksheet, including excess paces between words, this is what you need to do: Download and install a trial version of Ultimate Suite for Excel. Select the range in your table where you want to remove excess spaces. For new tables, I usually press Ctrl + A to process all columns in a go. Go to Ablebits Data tab and click on the Trim Spaces icon.

3 clicks to neat data with Trim Spaces tool
If you often import data to Excel from external sources and spend much time polishing up your tables, check out our Text tools for Excel. The Trim Spaces add-in will clean data imported from the web or any other external source. It removes leading and trailing spaces, excess blanks between words, non-breaking spaces, line breaks, non-printing symbols and other unwanted characters. Also, there is an option to convert words to UPPER, lower or Proper Case. And if you need to change text numbers back to the number format and delete apostrophes, this will not be a problem either. To remove all extra spaces in your worksheet, including excess paces between words, this is what you need to do: Download and install a trial version of Ultimate Suite for Excel. Select the range in your table where you want to remove excess spaces. For new tables, I usually press Ctrl + A to process all columns in a go. Go to Ablebits Data tab and click on the Trim Spaces icon.

How to remove blank spaces in Excel - leading, trailing, non-breaking How to remove spaces in Excel - leading, trailing, non-breaking
How to remove spaces in Excel - leading, trailing, non-breaking
How to remove blank spaces in Excel - leading, trailing, between words
=TRIM (A2)
How to delete line breaks and nonprinting characters
=TRIM (CLEAN (A2))
How to remove non-breaking spaces in Excel
=TRIM (SUBSTITUTE (A2, CHAR (160), " "))
=TRIM (CLEAN ( (SUBSTITUTE (A2,CHAR (160)," "))))
How to delete a specific non-printing character
=TRIM (SUBSTITUTE (SUBSTITUTE (A2, CHAR (127), " "), CHAR (160), " ")))
How to remove all spaces in Excel
=SUBSTITUTE (A2, CHAR (32), "")
=SUBSTITUTE (A2," ","")
How to count spaces in Excel
=LEN (A2)-LEN (SUBSTITUTE (A2," ",""))
=LEN (A2)-LEN (TRIM (A2))
Formula-free way to remove spaces and clean data
You may also be interested in
 Select the cells (range, entire column or row) where you want to delete extra spaces. Click the Trim Spaces button on the Ablebits Data tab. Choose one or several options: Remove leading and trailing spaces
Trim extra spaces between words to one
Delete non-breaking spaces ( )
Click the Trim button. Done! All extra spaces are deleted in a single click. This is how you can quickly remove spaces in Excel cells. If you ar

Select the cells (range, entire column or row) where you want to delete extra spaces. Click the Trim Spaces button on the Ablebits Data tab. Choose one or several options: Remove leading and trailing spaces
Trim extra spaces between words to one
Delete non-breaking spaces ( )
Click the Trim button. Done! All extra spaces are deleted in a single click. This is how you can quickly remove spaces in Excel cells. If you ar

Excel TRIM function - quick way to remove extra spaces Excel TRIM function - quick way to remove extra spaces
Excel TRIM function - quick way to remove extra spaces
TRIM function - remove extra spaces in Excel
TRIM (text)
=TRIM (A1)
=TRIM (CLEAN (A1))
How to use TRIM function in Excel - formula examples
How to trim spaces in an entire column of data
How to remove leading spaces in a numeric column
=VALUE (TRIM (A2))
How to remove only leading spaces in Excel (Left Trim)
=MID (A2,FIND (MID (TRIM (A2),1,1),A2),LEN (A2))
How to count extra spaces in a cell
=LEN (A2)-LEN (TRIM (A2))
How to highlight cells with excess spaces
=LEN ($A2)>LEN (TRIM ($A2))
Excel TRIM not working
=TRIM (SUBSTITUTE (A1, CHAR (160), " "))
=TRIM (CLEAN (SUBSTITUTE (A1, CHAR (160), " ")))
Leading space: =CODE (LEFT (A1,1))
Trailing space: =CODE (RIGHT (A1,1))
=CODE (MID (A1, n, 1)))
=TRIM (SUBSTITUTE (A1, CHAR (9), " "))
Trim Spaces for Excel - remove extra spaces in a click
Available downloads
You may also be interested in
 It deletes all leading, trailing and in-between spaces except for a single space character between words. The syntax of the TRIM function is the easiest one could imagine: TRIM (text)
Where text is a cell that you want to remove excess spaces from. For example, to remove spaces in cell A1, you use this formula: =TRIM (A1)
And the following screenshot shows the result: Yep, it's that simple! If in addition to extra spaces, your data contains line breaks and non-printing characters, use the TRIM function in combination with CLEAN to delete the first 32 non-printing characters in the in the 7-bit ASCII code system. For example, to remove spaces, line breaks and other unwanted characters from cell A1, use this formula: =TRIM (CLEAN (A1))
For more information, please see How to remove non-printing characters in Excel
How to use TRIM function in Excel - formula examples
Now that you know the basics, let's discuss a few specific uses of TRIM in Excel, pitfalls that you may face and working solutions. How to trim spaces in an entire column of data
Supposing you have a column of names that have some whitespace before and after the text, as well as more than one spaces between the words.

Excel TRIM function - quick way to remove extra spaces

Excel TRIM function - quick way to remove extra spaces
Excel TRIM function - quick way to remove extra spaces
TRIM function - remove extra spaces in Excel
TRIM (text)
=TRIM (A1)
=TRIM (CLEAN (A1))
How to use TRIM function in Excel - formula examples
How to trim spaces in an entire column of data
How to remove leading spaces in a numeric column
=VALUE (TRIM (A2))
How to remove only leading spaces in Excel (Left Trim)
=MID (A2,FIND (MID (TRIM (A2),1,1),A2),LEN (A2))
How to count extra spaces in a cell
=LEN (A2)-LEN (TRIM (A2))
How to highlight cells with excess spaces
=LEN ($A2)>LEN (TRIM ($A2))
Excel TRIM not working
=TRIM (SUBSTITUTE (A1, CHAR (160), " "))
=TRIM (CLEAN (SUBSTITUTE (A1, CHAR (160), " ")))
Leading space: =CODE (LEFT (A1,1))
Trailing space: =CODE (RIGHT (A1,1))
=CODE (MID (A1, n, 1)))
=TRIM (SUBSTITUTE (A1, CHAR (9), " "))
Trim Spaces for Excel - remove extra spaces in a click
Available downloads
You may also be interested in

It deletes all leading, trailing and in-between spaces except for a single space character between words. The syntax of the TRIM function is the easiest one could imagine: TRIM (text)
Where text is a cell that you want to remove excess spaces from. For example, to remove spaces in cell A1, you use this formula: =TRIM (A1)
And the following screenshot shows the result: Yep, it's that simple! If in addition to extra spaces, your data contains line breaks and non-printing characters, use the TRIM function in combination with CLEAN to delete the first 32 non-printing characters in the in the 7-bit ASCII code system. For example, to remove spaces, line breaks and other unwanted characters from cell A1, use this formula: =TRIM (CLEAN (A1))
For more information, please see How to remove non-printing characters in Excel
How to use TRIM function in Excel - formula examples
Now that you know the basics, let's discuss a few specific uses of TRIM in Excel, pitfalls that you may face and working solutions. How to trim spaces in an entire column of data
Supposing you have a column of names that have some whitespace before and after the text, as well as more than one spaces between the words.

3 ways to remove spaces between words / numbers in Excel cells 3 ways to remove spaces between words / numbers in Excel cells
3 ways to remove spaces between words / numbers in Excel cells
Trim blanks between words to 1, remove trailing / leading spaces
Use the Trim formula to remove extra spaces
Using Find & Replace to remove extra spaces between words
3 clicks to neat data with Trim Spaces tool
Remove all spaces between numbers
Using formula to remove all spaces
Video: how to remove spaces in Excel
You may also be interested in
 Feel free to use some tips from Enter the same formula into all selected cells at a time. Replace the original column with the one that has the cleaned data. Select all cells in the helper column and press Ctrl + C to copy data to clipboard. Now pick the first cell in the original column and press Shift + F10 or the menu button . Then just press V.
Remove the helper column. That's it! We deleted all excess blanks with the help of the formula trim (). Unfortunately, it's a bit time-consuming, especially if your spreadsheet is rather big. Note: If after using the formula you still see extra spaces (the last cell on the screenshot), please have a look at If the TRIM Function Doesn't Work
Using Find & Replace to remove extra spaces between words
This option needs fewer steps, but allows only deleting excess spaces between words.

Feel free to use some tips from Enter the same formula into all selected cells at a time. Replace the original column with the one that has the cleaned data. Select all cells in the helper column and press Ctrl + C to copy data to clipboard. Now pick the first cell in the original column and press Shift + F10 or the menu button . Then just press V.
Remove the helper column. That's it! We deleted all excess blanks with the help of the formula trim (). Unfortunately, it's a bit time-consuming, especially if your spreadsheet is rather big. Note: If after using the formula you still see extra spaces (the last cell on the screenshot), please have a look at If the TRIM Function Doesn't Work
Using Find & Replace to remove extra spaces between words
This option needs fewer steps, but allows only deleting excess spaces between words.

Excel TRIM function - quick way to remove extra spaces Excel TRIM function - quick way to remove extra spaces
Excel TRIM function - quick way to remove extra spaces
TRIM function - remove extra spaces in Excel
TRIM (text)
=TRIM (A1)
=TRIM (CLEAN (A1))
How to use TRIM function in Excel - formula examples
How to trim spaces in an entire column of data
How to remove leading spaces in a numeric column
=VALUE (TRIM (A2))
How to remove only leading spaces in Excel (Left Trim)
=MID (A2,FIND (MID (TRIM (A2),1,1),A2),LEN (A2))
How to count extra spaces in a cell
=LEN (A2)-LEN (TRIM (A2))
How to highlight cells with excess spaces
=LEN ($A2)>LEN (TRIM ($A2))
Excel TRIM not working
=TRIM (SUBSTITUTE (A1, CHAR (160), " "))
=TRIM (CLEAN (SUBSTITUTE (A1, CHAR (160), " ")))
Leading space: =CODE (LEFT (A1,1))
Trailing space: =CODE (RIGHT (A1,1))
=CODE (MID (A1, n, 1)))
=TRIM (SUBSTITUTE (A1, CHAR (9), " "))
Trim Spaces for Excel - remove extra spaces in a click
Available downloads
You may also be interested in
 As you see, the use of the TRIM function in Excel is easy and straightforward. Nevertheless, if someone wants to have a closer look at the formulas discussed in this tutorial, you are welcome to download the Trim Excel Spaces Workbook. Excel TRIM not working
The TRIM function is designed to remove only the space character, represented by code value 32 in the 7-bit ASCII character set. In the Unicode character set, there is one more space character called the non-breaking space, which is commonly used on web pages as the html character . The nonbreaking space has a decimal value of 160, and the TRIM function cannot remove it by itself. So, if your data set contains one or more white spaces that the TRIM function does not remove, use the SUBSTITUTE function to convert non-breaking spaces into regular spaces and then trim them. Assuming the text is in A1, the formula goes as follows: =TRIM (SUBSTITUTE (A1, CHAR (160), " "))
As an extra precaution, you can embed the CLEAN function to clean the cell of any non-printable characters: =TRIM (CLEAN (SUBSTITUTE (A1, CHAR (160), " ")))
The following screenshot shows the difference: If the above formulas do not work for you either, chances are that your data contain some specific nonprinting characters with code values other than 32 and 160.

As you see, the use of the TRIM function in Excel is easy and straightforward. Nevertheless, if someone wants to have a closer look at the formulas discussed in this tutorial, you are welcome to download the Trim Excel Spaces Workbook. Excel TRIM not working
The TRIM function is designed to remove only the space character, represented by code value 32 in the 7-bit ASCII character set. In the Unicode character set, there is one more space character called the non-breaking space, which is commonly used on web pages as the html character . The nonbreaking space has a decimal value of 160, and the TRIM function cannot remove it by itself. So, if your data set contains one or more white spaces that the TRIM function does not remove, use the SUBSTITUTE function to convert non-breaking spaces into regular spaces and then trim them. Assuming the text is in A1, the formula goes as follows: =TRIM (SUBSTITUTE (A1, CHAR (160), " "))
As an extra precaution, you can embed the CLEAN function to clean the cell of any non-printable characters: =TRIM (CLEAN (SUBSTITUTE (A1, CHAR (160), " ")))
The following screenshot shows the difference: If the above formulas do not work for you either, chances are that your data contain some specific nonprinting characters with code values other than 32 and 160.

Learn How to Remove Extra Spaces From Excel Using TRIM How to Remove Extra Spaces From Excel
How to Remove Extra Spaces From Excel
An easier way to clean up your Excel spreadsheet
How the TRIM Function Works
Using the TRIM Function
Removing Extra Spaces From an Entire Column
Using the Search and Replace Short Cut Key
Was this page helpful?
 Click on the top empty cell in your new column (B2). Type =TRIM (B2) and press Enter. Hold down the Shift key, and hover your mouse at the bottom of cell B2 until the cursor changes to two horizontal lines with an arrow above and below them. ( This feature isn't available in Excel Online; you'll have to use the Fill Handle to copy the formula.) Double-click the right mouse button to auto-fill the entire column
Now you'll have column A with the extra spaces, and column B with the same text cleaned up. Perform the same copy and paste (values only) procedure in the previous step, but copy and paste the entire columns rather than just individual cells. Finally, right click at the top of column B to highlight the entire column, and delete it, shifting all other cells on the spreadsheet to the left. Using the Search and Replace Short Cut Key
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. Select the entire column you want to clean.

Learn How to Remove Extra Spaces From Excel Using TRIM

How to Remove Extra Spaces From Excel
How to Remove Extra Spaces From Excel
An easier way to clean up your Excel spreadsheet
How the TRIM Function Works
Using the TRIM Function
Removing Extra Spaces From an Entire Column
Using the Search and Replace Short Cut Key
Was this page helpful?

Click on the top empty cell in your new column (B2). Type =TRIM (B2) and press Enter. Hold down the Shift key, and hover your mouse at the bottom of cell B2 until the cursor changes to two horizontal lines with an arrow above and below them. ( This feature isn't available in Excel Online; you'll have to use the Fill Handle to copy the formula.) Double-click the right mouse button to auto-fill the entire column
Now you'll have column A with the extra spaces, and column B with the same text cleaned up. Perform the same copy and paste (values only) procedure in the previous step, but copy and paste the entire columns rather than just individual cells. Finally, right click at the top of column B to highlight the entire column, and delete it, shifting all other cells on the spreadsheet to the left. Using the Search and Replace Short Cut Key
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. Select the entire column you want to clean.

Excel TRIM function - quick way to remove extra spaces Excel TRIM function - quick way to remove extra spaces
Excel TRIM function - quick way to remove extra spaces
TRIM function - remove extra spaces in Excel
TRIM (text)
=TRIM (A1)
=TRIM (CLEAN (A1))
How to use TRIM function in Excel - formula examples
How to trim spaces in an entire column of data
How to remove leading spaces in a numeric column
=VALUE (TRIM (A2))
How to remove only leading spaces in Excel (Left Trim)
=MID (A2,FIND (MID (TRIM (A2),1,1),A2),LEN (A2))
How to count extra spaces in a cell
=LEN (A2)-LEN (TRIM (A2))
How to highlight cells with excess spaces
=LEN ($A2)>LEN (TRIM ($A2))
Excel TRIM not working
=TRIM (SUBSTITUTE (A1, CHAR (160), " "))
=TRIM (CLEAN (SUBSTITUTE (A1, CHAR (160), " ")))
Leading space: =CODE (LEFT (A1,1))
Trailing space: =CODE (RIGHT (A1,1))
=CODE (MID (A1, n, 1)))
=TRIM (SUBSTITUTE (A1, CHAR (9), " "))
Trim Spaces for Excel - remove extra spaces in a click
Available downloads
You may also be interested in
 These are only a few examples of problems that you may be seeking answers to. And all are caused by extra spaces hiding before, after or between numeric and text values in your cells. Microsoft Excel offers a few different ways to remove spaces and clean up your data. In this tutorial, we will investigate the capabilities of the TRIM function as the fastest and easiest way to delete spaces in Excel. Excel TRIM function syntax
How to use TRIM in Excel - formula examples
Trim spaces in an entire column of data
Delete leading spaces in a numeric column
Remove leading spaces only (Left Trim)
Count extra spaces in cells
Highlight cells with any excess spaces
Excel TRIM not working - reasons and solutions
One-click way to trim spaces in Excel
TRIM function - remove extra spaces in Excel
You use the TRIM function in Excel removes extra spaces from text. It deletes all leading, trailing and in-between spaces except for a single space character between words. The syntax of the TRIM function is the easiest one could imagine: TRIM (text)
Where text is a cell that you want to remove excess spaces from. For example, to remove spaces in cell A1, you use this formula: =TRIM (A1)
And the following screenshot shows the result:

These are only a few examples of problems that you may be seeking answers to. And all are caused by extra spaces hiding before, after or between numeric and text values in your cells. Microsoft Excel offers a few different ways to remove spaces and clean up your data. In this tutorial, we will investigate the capabilities of the TRIM function as the fastest and easiest way to delete spaces in Excel. Excel TRIM function syntax
How to use TRIM in Excel - formula examples
Trim spaces in an entire column of data
Delete leading spaces in a numeric column
Remove leading spaces only (Left Trim)
Count extra spaces in cells
Highlight cells with any excess spaces
Excel TRIM not working - reasons and solutions
One-click way to trim spaces in Excel
TRIM function - remove extra spaces in Excel
You use the TRIM function in Excel removes extra spaces from text. It deletes all leading, trailing and in-between spaces except for a single space character between words. The syntax of the TRIM function is the easiest one could imagine: TRIM (text)
Where text is a cell that you want to remove excess spaces from. For example, to remove spaces in cell A1, you use this formula: =TRIM (A1)
And the following screenshot shows the result:

3 ways to remove spaces between words / numbers in Excel cells 3 ways to remove spaces between words / numbers in Excel cells
3 ways to remove spaces between words / numbers in Excel cells
Trim blanks between words to 1, remove trailing / leading spaces
Use the Trim formula to remove extra spaces
Using Find & Replace to remove extra spaces between words
3 clicks to neat data with Trim Spaces tool
Remove all spaces between numbers
Using formula to remove all spaces
Video: how to remove spaces in Excel
You may also be interested in
 3 ways to remove spaces between words / numbers in Excel cells
Nov
15
3 ways to remove spaces between words / numbers in Excel cells
by Alexander Frolov | updated on March 4, 2021
3 quick ways to remove extra spaces between words or delete all spaces from Excel cells. You can use trim formula, Excel Find & replace or special Excel add-in to clean up cells' content. When you paste data from an external source to an Excel spreadsheet (plain text reports, numbers from web pages, etc.), you are likely to get extra spaces along with important data. There can be leading and trailing spaces, several blanks between words and thousand separators for numbers. Consequently, your table looks disorderly and becomes difficult to use. It may be a challenge to find a customer in the Name column since you search for "John Doe" which has no excess spaces between the names while the way it looks in your table is "John Doe". Or numbers can't be summed up, and again extra blanks are the ones to blame. In this article you'll find how to clean up your data. Trim blanks between words to 1, remove trailing / leading spaces
Using trim formula
Employ the Find & Replace option
3 clicks to neat data with Trim Spaces tool
Remove All spaces between numbers or words
Video:

3 ways to remove spaces between words / numbers in Excel cells
Nov
15
3 ways to remove spaces between words / numbers in Excel cells
by Alexander Frolov | updated on March 4, 2021
3 quick ways to remove extra spaces between words or delete all spaces from Excel cells. You can use trim formula, Excel Find & replace or special Excel add-in to clean up cells' content. When you paste data from an external source to an Excel spreadsheet (plain text reports, numbers from web pages, etc.), you are likely to get extra spaces along with important data. There can be leading and trailing spaces, several blanks between words and thousand separators for numbers. Consequently, your table looks disorderly and becomes difficult to use. It may be a challenge to find a customer in the Name column since you search for "John Doe" which has no excess spaces between the names while the way it looks in your table is "John Doe". Or numbers can't be summed up, and again extra blanks are the ones to blame. In this article you'll find how to clean up your data. Trim blanks between words to 1, remove trailing / leading spaces
Using trim formula
Employ the Find & Replace option
3 clicks to neat data with Trim Spaces tool
Remove All spaces between numbers or words
Video:

Excel TRIM function - quick way to remove extra spaces Excel TRIM function - quick way to remove extra spaces
Excel TRIM function - quick way to remove extra spaces
TRIM function - remove extra spaces in Excel
TRIM (text)
=TRIM (A1)
=TRIM (CLEAN (A1))
How to use TRIM function in Excel - formula examples
How to trim spaces in an entire column of data
How to remove leading spaces in a numeric column
=VALUE (TRIM (A2))
How to remove only leading spaces in Excel (Left Trim)
=MID (A2,FIND (MID (TRIM (A2),1,1),A2),LEN (A2))
How to count extra spaces in a cell
=LEN (A2)-LEN (TRIM (A2))
How to highlight cells with excess spaces
=LEN ($A2)>LEN (TRIM ($A2))
Excel TRIM not working
=TRIM (SUBSTITUTE (A1, CHAR (160), " "))
=TRIM (CLEAN (SUBSTITUTE (A1, CHAR (160), " ")))
Leading space: =CODE (LEFT (A1,1))
Trailing space: =CODE (RIGHT (A1,1))
=CODE (MID (A1, n, 1)))
=TRIM (SUBSTITUTE (A1, CHAR (9), " "))
Trim Spaces for Excel - remove extra spaces in a click
Available downloads
You may also be interested in
 So, how do you remove all leading, trailing and excess in-between spaces in all cells at a time? By copying an Excel TRIM formula across the column, and then replacing formulas with their values. The detailed steps follow below. Write a TRIM formula for the topmost cell, A2 in our example: =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 into the plus sign, double-click it to copy the formula down the column, up to the last cell with data. As the result, you will have 2 columns - original names with spaces and formula-driven trimmed names. Finally, replace the values in the original column with the trimmed data. But be careful! Simply copying the trimmed column over the original column would destroy your formulas. To prevent this from happening, you need to copy only values, not formulas.

So, how do you remove all leading, trailing and excess in-between spaces in all cells at a time? By copying an Excel TRIM formula across the column, and then replacing formulas with their values. The detailed steps follow below. Write a TRIM formula for the topmost cell, A2 in our example: =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 into the plus sign, double-click it to copy the formula down the column, up to the last cell with data. As the result, you will have 2 columns - original names with spaces and formula-driven trimmed names. Finally, replace the values in the original column with the trimmed data. But be careful! Simply copying the trimmed column over the original column would destroy your formulas. To prevent this from happening, you need to copy only values, not formulas.

Trim spaces from Excel cell - free addin Remove leading and trailing spaces from Excel worksheets
Remove leading and trailing spaces from Excel worksheets
Trim Spaces for Microsoft Excel 2010-2000
How to remove extra spaces with Trim Spaces for Excel
If your cells have more than just leading and trailing spaces
Trim Spaces for Microsoft Excel system requirements
Microsoft Excel
Operating System
Trim Spaces for Microsoft Excel version
Add-in vendor
 Trim spaces from Excel cell - free addin
Remove leading and trailing spaces from Excel worksheets
Trim Spaces for Microsoft Excel 2010-2000
The Trim Spaces for Excel add-in will help you quickly remove leading and trailing spaces in the selected cells, columns, rows or the entire table. Just select the region that you want to clear up, click the "Run" button of the add-in and no excess spaces are left in your worksheet. Free Download
Freeware

Features
Requirements
How to remove extra spaces with Trim Spaces for Excel
In your Microsoft Excel worksheet, select the cells, columns or rows from which you want to remove excess spaces. Start the Trim Spaces by clicking on its icon, or go to Excel Menu Ablebits.com -> Trim Spaces for Excel . If you have Excel 2007 or 2010, you can find it on the Ablebits.com tab on the Ribbon. Click the " Run " button and enjoy the results! If your cells have more than just leading and trailing spaces
Extra spaces between the words, non-breaking spaces, other formatting issues like numbers stored as text or words written in a wrong case can all hamper your work with data in Excel. In this case your best aid is the Cell Cleaner add-in. Besides cleaning up cells in your worksheets, this advanced tool can process larger volumes of data as it supports all Excel versions from 2003 to 2013 32 and 64-bit. Trim Spaces for Microsoft Excel system requirements
Microsoft Excel
Microsoft Excel 2010 (32bit)
Microsoft Excel 2007
Microsoft Excel 2003
Operating System
Windows 10 (32 and 64-bit)
Windows 8 (32 and 64-bit)
Windows 7 (32 and 64-bit)
Windows Vista (32 and 64-bit)
Windows XP (32-bit)
Windows Server 2003, 2008, 2012
Trim Spaces for Microsoft Excel version
Current add-in version:

Trim spaces from Excel cell - free addin

Remove leading and trailing spaces from Excel worksheets
Remove leading and trailing spaces from Excel worksheets
Trim Spaces for Microsoft Excel 2010-2000
How to remove extra spaces with Trim Spaces for Excel
If your cells have more than just leading and trailing spaces
Trim Spaces for Microsoft Excel system requirements
Microsoft Excel
Operating System
Trim Spaces for Microsoft Excel version
Add-in vendor

How to remove blank spaces in Excel - leading, trailing, non-breaking How to remove spaces in Excel - leading, trailing, non-breaking
How to remove spaces in Excel - leading, trailing, non-breaking
How to remove blank spaces in Excel - leading, trailing, between words
=TRIM (A2)
How to delete line breaks and nonprinting characters
=TRIM (CLEAN (A2))
How to remove non-breaking spaces in Excel
=TRIM (SUBSTITUTE (A2, CHAR (160), " "))
=TRIM (CLEAN ( (SUBSTITUTE (A2,CHAR (160)," "))))
How to delete a specific non-printing character
=TRIM (SUBSTITUTE (SUBSTITUTE (A2, CHAR (127), " "), CHAR (160), " ")))
How to remove all spaces in Excel
=SUBSTITUTE (A2, CHAR (32), "")
=SUBSTITUTE (A2," ","")
How to count spaces in Excel
=LEN (A2)-LEN (SUBSTITUTE (A2," ",""))
=LEN (A2)-LEN (TRIM (A2))
Formula-free way to remove spaces and clean data
You may also be interested in
 And now, you only need to replace values in the original column with trimmed values. The easiest way to do this is using Paste Special > Values, the detailed instructions can be found here: How to copy values in Excel. Additionally, you can use the Excel TRIM function to remove leading spaces only, keeping all spaces in the middle of a text string intact. The formula example is here: How to trim leading spaces in Excel (Left Trim)
How to delete line breaks and nonprinting characters
When you import data from external sources, it's not only extra spaces that come along, but also various non-printing characters like carriage return, line feed, vertical or horizontal tab, etc. The TRIM function can get rid of white spaces, but it cannot eliminate non-printing characters. Technically, Excel TRIM is designed to only delete value 32 in the 7-bit ASCII system, which is the space character. To remove spaces and non-printing characters in a string, use TRIM in combination with the CLEAN function. As its names suggests, CLEAN is purposed for cleaning data, and it can delete any and all of the first 32 non-printing characters in the in the 7-bit ASCII set (values 0 through 31) including line break (value 10).

And now, you only need to replace values in the original column with trimmed values. The easiest way to do this is using Paste Special > Values, the detailed instructions can be found here: How to copy values in Excel. Additionally, you can use the Excel TRIM function to remove leading spaces only, keeping all spaces in the middle of a text string intact. The formula example is here: How to trim leading spaces in Excel (Left Trim)
How to delete line breaks and nonprinting characters
When you import data from external sources, it's not only extra spaces that come along, but also various non-printing characters like carriage return, line feed, vertical or horizontal tab, etc. The TRIM function can get rid of white spaces, but it cannot eliminate non-printing characters. Technically, Excel TRIM is designed to only delete value 32 in the 7-bit ASCII system, which is the space character. To remove spaces and non-printing characters in a string, use TRIM in combination with the CLEAN function. As its names suggests, CLEAN is purposed for cleaning data, and it can delete any and all of the first 32 non-printing characters in the in the 7-bit ASCII set (values 0 through 31) including line break (value 10).

Excel TRIM function - quick way to remove extra spaces Excel TRIM function - quick way to remove extra spaces
Excel TRIM function - quick way to remove extra spaces
TRIM function - remove extra spaces in Excel
TRIM (text)
=TRIM (A1)
=TRIM (CLEAN (A1))
How to use TRIM function in Excel - formula examples
How to trim spaces in an entire column of data
How to remove leading spaces in a numeric column
=VALUE (TRIM (A2))
How to remove only leading spaces in Excel (Left Trim)
=MID (A2,FIND (MID (TRIM (A2),1,1),A2),LEN (A2))
How to count extra spaces in a cell
=LEN (A2)-LEN (TRIM (A2))
How to highlight cells with excess spaces
=LEN ($A2)>LEN (TRIM ($A2))
Excel TRIM not working
=TRIM (SUBSTITUTE (A1, CHAR (160), " "))
=TRIM (CLEAN (SUBSTITUTE (A1, CHAR (160), " ")))
Leading space: =CODE (LEFT (A1,1))
Trailing space: =CODE (RIGHT (A1,1))
=CODE (MID (A1, n, 1)))
=TRIM (SUBSTITUTE (A1, CHAR (9), " "))
Trim Spaces for Excel - remove extra spaces in a click
Available downloads
You may also be interested in
 As the result, you will have 2 columns - original names with spaces and formula-driven trimmed names. Finally, replace the values in the original column with the trimmed data. But be careful! Simply copying the trimmed column over the original column would destroy your formulas. To prevent this from happening, you need to copy only values, not formulas. Here's how: Select all cells with Trim formulas (B2: B8 in this example), and press Ctrl+C to copy them. Select all cells with the original data (A2: A8), and press Ctrl+Alt+V, then V. It is the paste values shortcut that applies the Paste Special > Values
Press the Enter key.

As the result, you will have 2 columns - original names with spaces and formula-driven trimmed names. Finally, replace the values in the original column with the trimmed data. But be careful! Simply copying the trimmed column over the original column would destroy your formulas. To prevent this from happening, you need to copy only values, not formulas. Here's how: Select all cells with Trim formulas (B2: B8 in this example), and press Ctrl+C to copy them. Select all cells with the original data (A2: A8), and press Ctrl+Alt+V, then V. It is the paste values shortcut that applies the Paste Special > Values
Press the Enter key.

3 ways to remove spaces between words / numbers in Excel cells 3 ways to remove spaces between words / numbers in Excel cells
3 ways to remove spaces between words / numbers in Excel cells
Trim blanks between words to 1, remove trailing / leading spaces
Use the Trim formula to remove extra spaces
Using Find & Replace to remove extra spaces between words
3 clicks to neat data with Trim Spaces tool
Remove all spaces between numbers
Using formula to remove all spaces
Video: how to remove spaces in Excel
You may also be interested in
 That's it! We deleted all excess blanks with the help of the formula trim (). Unfortunately, it's a bit time-consuming, especially if your spreadsheet is rather big. Note: If after using the formula you still see extra spaces (the last cell on the screenshot), please have a look at If the TRIM Function Doesn't Work
Using Find & Replace to remove extra spaces between words
This option needs fewer steps, but allows only deleting excess spaces between words. Leading and trailing spaces will also be trimmed to 1, but will not be removed. Select one or several columns with the data to delete spaces between words. Press Ctrl + H to get the " Find and Replace " dialog box. Press the Space bar twice in the Find What field and once in Replace With
Click on the " Replace all " button, and then press Ok to close Excel confirmation dialog. Repeat step 4 until you see the message "We couldn't find anything to replace." :)

That's it! We deleted all excess blanks with the help of the formula trim (). Unfortunately, it's a bit time-consuming, especially if your spreadsheet is rather big. Note: If after using the formula you still see extra spaces (the last cell on the screenshot), please have a look at If the TRIM Function Doesn't Work
Using Find & Replace to remove extra spaces between words
This option needs fewer steps, but allows only deleting excess spaces between words. Leading and trailing spaces will also be trimmed to 1, but will not be removed. Select one or several columns with the data to delete spaces between words. Press Ctrl + H to get the " Find and Replace " dialog box. Press the Space bar twice in the Find What field and once in Replace With
Click on the " Replace all " button, and then press Ok to close Excel confirmation dialog. Repeat step 4 until you see the message "We couldn't find anything to replace." :)

Remove Extra Spaces from Excel Data | Pryor Learning Solutions Remove Extra Spaces from Excel Data
Remove Extra Spaces from Excel Data
Use the Trim Function
Use a Formula to Remove All Spaces
Bonus Hint!
Tepring Crocker
 Option 2
Use a Formula to Remove All Spaces
If you need to prepare your data for import into a database (such as MS Access) or have a combination of number and text data that simply needs ALL spaces removed, you can use a formula instead of the TRIM function to remove ALL blanks in a cell. Step 1
Create a temporary, or helper, column for the corrected data at the end of your spreadsheet like you did for the TRIM function. In this example the column is called No Spaces. Step 2
Click in the first cell of the Trim column. On the Formulas tab, click the Text dropdown menu in the Functions group and select SUBSTITUTE. Step 3
When the dialog box appears: Click on the first cell in the column that you need changed
In the “Old_text” field, enter the character you want replaced separated by quotes. To remove spaces this would then be ” “. In the “New_text” field, enter the character you want to appear instead. Since we want NO characters to replace the space, type “”.

Remove Extra Spaces from Excel Data | Pryor Learning Solutions

Remove Extra Spaces from Excel Data
Remove Extra Spaces from Excel Data
Use the Trim Function
Use a Formula to Remove All Spaces
Bonus Hint!
Tepring Crocker

Option 2
Use a Formula to Remove All Spaces
If you need to prepare your data for import into a database (such as MS Access) or have a combination of number and text data that simply needs ALL spaces removed, you can use a formula instead of the TRIM function to remove ALL blanks in a cell. Step 1
Create a temporary, or helper, column for the corrected data at the end of your spreadsheet like you did for the TRIM function. In this example the column is called No Spaces. Step 2
Click in the first cell of the Trim column. On the Formulas tab, click the Text dropdown menu in the Functions group and select SUBSTITUTE. Step 3
When the dialog box appears: Click on the first cell in the column that you need changed
In the “Old_text” field, enter the character you want replaced separated by quotes. To remove spaces this would then be ” “. In the “New_text” field, enter the character you want to appear instead. Since we want NO characters to replace the space, type “”.

Excel TRIM function - quick way to remove extra spaces Excel TRIM function - quick way to remove extra spaces
Excel TRIM function - quick way to remove extra spaces
TRIM function - remove extra spaces in Excel
TRIM (text)
=TRIM (A1)
=TRIM (CLEAN (A1))
How to use TRIM function in Excel - formula examples
How to trim spaces in an entire column of data
How to remove leading spaces in a numeric column
=VALUE (TRIM (A2))
How to remove only leading spaces in Excel (Left Trim)
=MID (A2,FIND (MID (TRIM (A2),1,1),A2),LEN (A2))
How to count extra spaces in a cell
=LEN (A2)-LEN (TRIM (A2))
How to highlight cells with excess spaces
=LEN ($A2)>LEN (TRIM ($A2))
Excel TRIM not working
=TRIM (SUBSTITUTE (A1, CHAR (160), " "))
=TRIM (CLEAN (SUBSTITUTE (A1, CHAR (160), " ")))
Leading space: =CODE (LEFT (A1,1))
Trailing space: =CODE (RIGHT (A1,1))
=CODE (MID (A1, n, 1)))
=TRIM (SUBSTITUTE (A1, CHAR (9), " "))
Trim Spaces for Excel - remove extra spaces in a click
Available downloads
You may also be interested in
 From all appearances, the trimmed values are text strings, while we want numbers. To fix this, you can multiply the trimmed values by 1 (to multiply all the values in one fell swoop, use the Paste Special > Multiply option). A more elegant solution is enclosing the TRIM function in VALUE, like this: =VALUE (TRIM (A2))
The above formula removes all leading and trailing spaces, if any, and turns the resulting value into a number, as shown in the screenshot below: How to remove only leading spaces in Excel (Left Trim)
In some situations, you may type duplicated and even triplicated spaces between words to make your data better readable. However, you do want to get rid of leading spaces, like this: As you already know, the TRIM function eliminates extra spaces in the middle of text strings, which is not what we want. To keep all in-between spaces intact, we'll be using a bit more complex formula: =MID (A2,FIND (MID (TRIM (A2),1,1),A2),LEN (A2))
In the above formula, the combination of FIND, MID and TRIM calculates the position of the first text character in a string. And then, you supply that number to another MID function so that it returns the entire text string (the string length is calculated by LEN) starting at the position of the first text character.

From all appearances, the trimmed values are text strings, while we want numbers. To fix this, you can multiply the trimmed values by 1 (to multiply all the values in one fell swoop, use the Paste Special > Multiply option). A more elegant solution is enclosing the TRIM function in VALUE, like this: =VALUE (TRIM (A2))
The above formula removes all leading and trailing spaces, if any, and turns the resulting value into a number, as shown in the screenshot below: How to remove only leading spaces in Excel (Left Trim)
In some situations, you may type duplicated and even triplicated spaces between words to make your data better readable. However, you do want to get rid of leading spaces, like this: As you already know, the TRIM function eliminates extra spaces in the middle of text strings, which is not what we want. To keep all in-between spaces intact, we'll be using a bit more complex formula: =MID (A2,FIND (MID (TRIM (A2),1,1),A2),LEN (A2))
In the above formula, the combination of FIND, MID and TRIM calculates the position of the first text character in a string. And then, you supply that number to another MID function so that it returns the entire text string (the string length is calculated by LEN) starting at the position of the first text character.

How to Remove Whitespace From a String in Excel | Small Business - Chron.com How to Remove Whitespace From a String in Excel
How to Remove Whitespace From a String in Excel
1
2
3
 however, it cannot remove non-breaking spaces – this requires a combination Excel's Substitute and Trim functions. 1
Open your spreadsheet in Excel and locate the cells containing the whitespace that needs to be removed. 2
Use the Trim function to remove whitespace created from normal spaces. The Trim function requires a single reference to operate. For example, entering "=TRIM (A1)" without quotes will strip all but single spaces between words from the string " this is a test " in cell A1, leaving "this is a test". 3
Use the Substitute function to change non-breaking spaces to regular spaces. For example, "=TRIM (SUBSTITUTE (A1,CHAR (160),CHAR (32)))" without the quotes replaces non-breaking spaces (ASCII character 160) in cell "A1" with standard spaces (ASCII character 32) and then trims leading, trailing and repetitive spaces. ‒‒:‒‒
/
‒‒:‒‒
Replay
Skip
Ads by
Read More
References
Microsoft: Top Ten Ways to Clean Your Data
Microsoft: Remove Spaces From the Beginning and End of a Cell
Tips
To remove whitespace in a long list of cells, copy the Trim or Substitute formula by dragging its bottom-right drag bar down the formula column.

How to Remove Whitespace From a String in Excel | Small Business - Chron.com

How to Remove Whitespace From a String in Excel
How to Remove Whitespace From a String in Excel
1
2
3

however, it cannot remove non-breaking spaces – this requires a combination Excel's Substitute and Trim functions. 1
Open your spreadsheet in Excel and locate the cells containing the whitespace that needs to be removed. 2
Use the Trim function to remove whitespace created from normal spaces. The Trim function requires a single reference to operate. For example, entering "=TRIM (A1)" without quotes will strip all but single spaces between words from the string " this is a test " in cell A1, leaving "this is a test". 3
Use the Substitute function to change non-breaking spaces to regular spaces. For example, "=TRIM (SUBSTITUTE (A1,CHAR (160),CHAR (32)))" without the quotes replaces non-breaking spaces (ASCII character 160) in cell "A1" with standard spaces (ASCII character 32) and then trims leading, trailing and repetitive spaces. ‒‒:‒‒
/
‒‒:‒‒
Replay
Skip
Ads by
Read More
References
Microsoft: Top Ten Ways to Clean Your Data
Microsoft: Remove Spaces From the Beginning and End of a Cell
Tips
To remove whitespace in a long list of cells, copy the Trim or Substitute formula by dragging its bottom-right drag bar down the formula column.

Excel TRIM function - quick way to remove extra spaces Excel TRIM function - quick way to remove extra spaces
Excel TRIM function - quick way to remove extra spaces
TRIM function - remove extra spaces in Excel
TRIM (text)
=TRIM (A1)
=TRIM (CLEAN (A1))
How to use TRIM function in Excel - formula examples
How to trim spaces in an entire column of data
How to remove leading spaces in a numeric column
=VALUE (TRIM (A2))
How to remove only leading spaces in Excel (Left Trim)
=MID (A2,FIND (MID (TRIM (A2),1,1),A2),LEN (A2))
How to count extra spaces in a cell
=LEN (A2)-LEN (TRIM (A2))
How to highlight cells with excess spaces
=LEN ($A2)>LEN (TRIM ($A2))
Excel TRIM not working
=TRIM (SUBSTITUTE (A1, CHAR (160), " "))
=TRIM (CLEAN (SUBSTITUTE (A1, CHAR (160), " ")))
Leading space: =CODE (LEFT (A1,1))
Trailing space: =CODE (RIGHT (A1,1))
=CODE (MID (A1, n, 1)))
=TRIM (SUBSTITUTE (A1, CHAR (9), " "))
Trim Spaces for Excel - remove extra spaces in a click
Available downloads
You may also be interested in
 Yep, it's that simple! If in addition to extra spaces, your data contains line breaks and non-printing characters, use the TRIM function in combination with CLEAN to delete the first 32 non-printing characters in the in the 7-bit ASCII code system. For example, to remove spaces, line breaks and other unwanted characters from cell A1, use this formula: =TRIM (CLEAN (A1))
For more information, please see How to remove non-printing characters in Excel
How to use TRIM function in Excel - formula examples
Now that you know the basics, let's discuss a few specific uses of TRIM in Excel, pitfalls that you may face and working solutions. How to trim spaces in an entire column of data
Supposing you have a column of names that have some whitespace before and after the text, as well as more than one spaces between the words. So, how do you remove all leading, trailing and excess in-between spaces in all cells at a time? By copying an Excel TRIM formula across the column, and then replacing formulas with their values. The detailed steps follow below. Write a TRIM formula for the topmost cell, A2 in our example: =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 into the plus sign, double-click it to copy the formula down the column, up to the last cell with data.

Remove Extra Spaces from Excel Data | Pryor Learning Solutions Remove Extra Spaces from Excel Data
Remove Extra Spaces from Excel Data
Use the Trim Function
Use a Formula to Remove All Spaces
Bonus Hint!
Tepring Crocker
 However, the # of Characters column reveals that there are hidden spaces buried in the text. Step 1
To use the TRIM function, you will need to create a temporary, or helper, column for the corrected data at the end of your spreadsheet. For the purposes of this demonstration, we’ve called the column “Trim.” To follow using our example above, download Excel Remove Spaces Formula Template
Step 2
Click in the first cell of the Trim column. On the Formulas tab, click the Text dropdown menu in the Functions group and select TRIM. Step 3
After the dialog box appears, click on the cell that contains the text you would like to remove spaces from to complete the function. Click OK. Step 4
Copy the function to the remaining cells in the column to apply the function to the rest of the Name cells. You can see that the TRIM function cleaned up the extra spaces and the character counts are now all the same except for the “JoeSmith” that did not have any spaces between the first and last name. Note that TRIM will not ADD spaces.

However, the # of Characters column reveals that there are hidden spaces buried in the text. Step 1
To use the TRIM function, you will need to create a temporary, or helper, column for the corrected data at the end of your spreadsheet. For the purposes of this demonstration, we’ve called the column “Trim.” To follow using our example above, download Excel Remove Spaces Formula Template
Step 2
Click in the first cell of the Trim column. On the Formulas tab, click the Text dropdown menu in the Functions group and select TRIM. Step 3
After the dialog box appears, click on the cell that contains the text you would like to remove spaces from to complete the function. Click OK. Step 4
Copy the function to the remaining cells in the column to apply the function to the rest of the Name cells. You can see that the TRIM function cleaned up the extra spaces and the character counts are now all the same except for the “JoeSmith” that did not have any spaces between the first and last name. Note that TRIM will not ADD spaces.

How to Remove Leading Blank Spaces in Excel | Small Business - Chron.com How to Remove Leading Blank Spaces in Excel
How to Remove Leading Blank Spaces in Excel
1
2
3
4
5
 4
Click on the header of the column to select the calculated values that result from your TRIM function. Press "Ctrl-C" to copy the data. 5
Click on the header of the column that contains the data you just cleaned up. Click on the Home tab of the Excel Ribbon and locate its Clipboard group. Click on the arrow below "Paste" and choose "Paste Special." Select the "Values" option. Your cleaned-up, calculated values replace the original cell contents. ‒‒:‒‒
/
‒‒:‒‒
Replay
Skip
Ads by
Read More
References
Microsoft Office: Move or Copy Cells and Cell Contents
Microsoft Support: How to use the AutoFill Options button in Excel
Microsoft Office:

4
Click on the header of the column to select the calculated values that result from your TRIM function. Press "Ctrl-C" to copy the data. 5
Click on the header of the column that contains the data you just cleaned up. Click on the Home tab of the Excel Ribbon and locate its Clipboard group. Click on the arrow below "Paste" and choose "Paste Special." Select the "Values" option. Your cleaned-up, calculated values replace the original cell contents. ‒‒:‒‒
/
‒‒:‒‒
Replay
Skip
Ads by
Read More
References
Microsoft Office: Move or Copy Cells and Cell Contents
Microsoft Support: How to use the AutoFill Options button in Excel
Microsoft Office:

Learn How to Remove Extra Spaces From Excel Using TRIM How to Remove Extra Spaces From Excel
How to Remove Extra Spaces From Excel
An easier way to clean up your Excel spreadsheet
How the TRIM Function Works
Using the TRIM Function
Removing Extra Spaces From an Entire Column
Using the Search and Replace Short Cut Key
Was this page helpful?
 Instead, click the down arrow under Paste on the Home ribbon, then select Paste Values. Removing Extra Spaces From an Entire Column
The method above works well if you're only cleaning spaces from one cell, but what if you want to remove spaces from an entire column? The procedure for dealing with a column isn't that different from dealing with one cell. In this example, the column with too many spaces starts with A2. Create a new empty column beside the column you want to remove spaces from (in this example this new column starts with B2). Click on the top empty cell in your new column (B2). Type =TRIM (B2) and press Enter. Hold down the Shift key, and hover your mouse at the bottom of cell B2 until the cursor changes to two horizontal lines with an arrow above and below them. ( This feature isn't available in Excel Online; you'll have to use the Fill Handle to copy the formula.)

Instead, click the down arrow under Paste on the Home ribbon, then select Paste Values. Removing Extra Spaces From an Entire Column
The method above works well if you're only cleaning spaces from one cell, but what if you want to remove spaces from an entire column? The procedure for dealing with a column isn't that different from dealing with one cell. In this example, the column with too many spaces starts with A2. Create a new empty column beside the column you want to remove spaces from (in this example this new column starts with B2). Click on the top empty cell in your new column (B2). Type =TRIM (B2) and press Enter. Hold down the Shift key, and hover your mouse at the bottom of cell B2 until the cursor changes to two horizontal lines with an arrow above and below them. ( This feature isn't available in Excel Online; you'll have to use the Fill Handle to copy the formula.)

How to remove blank spaces in Excel - leading, trailing, non-breaking How to remove spaces in Excel - leading, trailing, non-breaking
How to remove spaces in Excel - leading, trailing, non-breaking
How to remove blank spaces in Excel - leading, trailing, between words
=TRIM (A2)
How to delete line breaks and nonprinting characters
=TRIM (CLEAN (A2))
How to remove non-breaking spaces in Excel
=TRIM (SUBSTITUTE (A2, CHAR (160), " "))
=TRIM (CLEAN ( (SUBSTITUTE (A2,CHAR (160)," "))))
How to delete a specific non-printing character
=TRIM (SUBSTITUTE (SUBSTITUTE (A2, CHAR (127), " "), CHAR (160), " ")))
How to remove all spaces in Excel
=SUBSTITUTE (A2, CHAR (32), "")
=SUBSTITUTE (A2," ","")
How to count spaces in Excel
=LEN (A2)-LEN (SUBSTITUTE (A2," ",""))
=LEN (A2)-LEN (TRIM (A2))
Formula-free way to remove spaces and clean data
You may also be interested in
 How to trim leading spaces in Excel (Left Trim)
How to delete line breaks and nonprinting characters
When you import data from external sources, it's not only extra spaces that come along, but also various non-printing characters like carriage return, line feed, vertical or horizontal tab, etc. The TRIM function can get rid of white spaces, but it cannot eliminate non-printing characters. Technically, Excel TRIM is designed to only delete value 32 in the 7-bit ASCII system, which is the space character. To remove spaces and non-printing characters in a string, use TRIM in combination with the CLEAN function. As its names suggests, CLEAN is purposed for cleaning data, and it can delete any and all of the first 32 non-printing characters in the in the 7-bit ASCII set (values 0 through 31) including line break (value 10). Assuming the data to be cleaned is in cell A2, the formula is as follows: =TRIM (CLEAN (A2))
If the Trim/Clean formula joins the contents of multiple lines without spaces, you can fix it by using one of these techniques: Utilize the "Replace All" feature of Excel: in the "Find what" box, input a carriage return by pressing the Ctrl+J shortcut; and in the "Replace with" box, type a space.

How to trim leading spaces in Excel (Left Trim)
How to delete line breaks and nonprinting characters
When you import data from external sources, it's not only extra spaces that come along, but also various non-printing characters like carriage return, line feed, vertical or horizontal tab, etc. The TRIM function can get rid of white spaces, but it cannot eliminate non-printing characters. Technically, Excel TRIM is designed to only delete value 32 in the 7-bit ASCII system, which is the space character. To remove spaces and non-printing characters in a string, use TRIM in combination with the CLEAN function. As its names suggests, CLEAN is purposed for cleaning data, and it can delete any and all of the first 32 non-printing characters in the in the 7-bit ASCII set (values 0 through 31) including line break (value 10). Assuming the data to be cleaned is in cell A2, the formula is as follows: =TRIM (CLEAN (A2))
If the Trim/Clean formula joins the contents of multiple lines without spaces, you can fix it by using one of these techniques: Utilize the "Replace All" feature of Excel: in the "Find what" box, input a carriage return by pressing the Ctrl+J shortcut; and in the "Replace with" box, type a space.

3 ways to remove spaces between words / numbers in Excel cells 3 ways to remove spaces between words / numbers in Excel cells
3 ways to remove spaces between words / numbers in Excel cells
Trim blanks between words to 1, remove trailing / leading spaces
Use the Trim formula to remove extra spaces
Using Find & Replace to remove extra spaces between words
3 clicks to neat data with Trim Spaces tool
Remove all spaces between numbers
Using formula to remove all spaces
Video: how to remove spaces in Excel
You may also be interested in
 Press Ctrl + Space to select all cells in a column. Press Ctrl + H to open the " Find & Replace " dialog box. Press Space bar in the Find What field and make sure the " Replace with " field is empty. Click on the " Replace all " button, and then press Ok. Voila! All spaces are removed. Using formula to remove all spaces
You may need to delete all blanks, like in a formula chain. To do this, you can create a helper column and enter the formula: =SUBSTITUTE (A1," ","")
Here A1 is the first cell of the column with numbers or words where all spaces must be deleted. Then follow the steps from the part using formula to remove extra spaces between words to 1
Video:

Press Ctrl + Space to select all cells in a column. Press Ctrl + H to open the " Find & Replace " dialog box. Press Space bar in the Find What field and make sure the " Replace with " field is empty. Click on the " Replace all " button, and then press Ok. Voila! All spaces are removed. Using formula to remove all spaces
You may need to delete all blanks, like in a formula chain. To do this, you can create a helper column and enter the formula: =SUBSTITUTE (A1," ","")
Here A1 is the first cell of the column with numbers or words where all spaces must be deleted. Then follow the steps from the part using formula to remove extra spaces between words to 1
Video:

Excel TRIM function - quick way to remove extra spaces Excel TRIM function - quick way to remove extra spaces
Excel TRIM function - quick way to remove extra spaces
TRIM function - remove extra spaces in Excel
TRIM (text)
=TRIM (A1)
=TRIM (CLEAN (A1))
How to use TRIM function in Excel - formula examples
How to trim spaces in an entire column of data
How to remove leading spaces in a numeric column
=VALUE (TRIM (A2))
How to remove only leading spaces in Excel (Left Trim)
=MID (A2,FIND (MID (TRIM (A2),1,1),A2),LEN (A2))
How to count extra spaces in a cell
=LEN (A2)-LEN (TRIM (A2))
How to highlight cells with excess spaces
=LEN ($A2)>LEN (TRIM ($A2))
Excel TRIM not working
=TRIM (SUBSTITUTE (A1, CHAR (160), " "))
=TRIM (CLEAN (SUBSTITUTE (A1, CHAR (160), " ")))
Leading space: =CODE (LEFT (A1,1))
Trailing space: =CODE (RIGHT (A1,1))
=CODE (MID (A1, n, 1)))
=TRIM (SUBSTITUTE (A1, CHAR (9), " "))
Trim Spaces for Excel - remove extra spaces in a click
Available downloads
You may also be interested in
 The following screenshot shows that all leading spaces are gone, while multiple spaces between words are still there: As a finishing touch, replace the original text with the trimmed values, as shown in step 3 of the Trim formula example, and you are good to go! Tip. If you also want to remove spaces from the end of cells, make use of the Trim Spaces tool. There is no obvious Excel formula to remove leading and trailing spaces keeping multiple spaces between words intact. How to count extra spaces in a cell
Sometimes, before removing spaces in your Excel sheet, you may want to know how many excess spaces are actually there. To get the number of extra spaces in a cell, find out the total text length using the LEN function, then calculate the string length without extra spaces, and subtract the latter from the former: =LEN (A2)-LEN (TRIM (A2))
The following screenshot shows the above formula in action: Note. The formula returns the count of extra spaces in a cell, i.e. leading, trailing, and more than one consecutive spaces between words, but it does not count single spaces in the middle of the text.

The following screenshot shows that all leading spaces are gone, while multiple spaces between words are still there: As a finishing touch, replace the original text with the trimmed values, as shown in step 3 of the Trim formula example, and you are good to go! Tip. If you also want to remove spaces from the end of cells, make use of the Trim Spaces tool. There is no obvious Excel formula to remove leading and trailing spaces keeping multiple spaces between words intact. How to count extra spaces in a cell
Sometimes, before removing spaces in your Excel sheet, you may want to know how many excess spaces are actually there. To get the number of extra spaces in a cell, find out the total text length using the LEN function, then calculate the string length without extra spaces, and subtract the latter from the former: =LEN (A2)-LEN (TRIM (A2))
The following screenshot shows the above formula in action: Note. The formula returns the count of extra spaces in a cell, i.e. leading, trailing, and more than one consecutive spaces between words, but it does not count single spaces in the middle of the text.

Excel TRIM function - quick way to remove extra spaces Excel TRIM function - quick way to remove extra spaces
Excel TRIM function - quick way to remove extra spaces
TRIM function - remove extra spaces in Excel
TRIM (text)
=TRIM (A1)
=TRIM (CLEAN (A1))
How to use TRIM function in Excel - formula examples
How to trim spaces in an entire column of data
How to remove leading spaces in a numeric column
=VALUE (TRIM (A2))
How to remove only leading spaces in Excel (Left Trim)
=MID (A2,FIND (MID (TRIM (A2),1,1),A2),LEN (A2))
How to count extra spaces in a cell
=LEN (A2)-LEN (TRIM (A2))
How to highlight cells with excess spaces
=LEN ($A2)>LEN (TRIM ($A2))
Excel TRIM not working
=TRIM (SUBSTITUTE (A1, CHAR (160), " "))
=TRIM (CLEAN (SUBSTITUTE (A1, CHAR (160), " ")))
Leading space: =CODE (LEFT (A1,1))
Trailing space: =CODE (RIGHT (A1,1))
=CODE (MID (A1, n, 1)))
=TRIM (SUBSTITUTE (A1, CHAR (9), " "))
Trim Spaces for Excel - remove extra spaces in a click
Available downloads
You may also be interested in
 The formula instructs Excel to highlight cells in which the total string length is greater than the length of the trimmed text. To create a conditional formatting rule, select all the cells (rows) that you want to highlight without column headers, go to the Home tab > Styles group, and click Conditional formatting > New Rule > Use a formula to determine which cells to format. If you are not familiar with Excel conditional formatting yet, you will find the detailed steps here: How to create a conditional formatting rule based on formula. As demonstrated in the screenshot below, the result perfectly corroborates with the extra spaces count that we got in the previous example: As you see, the use of the TRIM function in Excel is easy and straightforward. Nevertheless, if someone wants to have a closer look at the formulas discussed in this tutorial, you are welcome to download the Trim Excel Spaces Workbook. Excel TRIM not working
The TRIM function is designed to remove only the space character, represented by code value 32 in the 7-bit ASCII character set. In the Unicode character set, there is one more space character called the non-breaking space, which is commonly used on web pages as the html character . The nonbreaking space has a decimal value of 160, and the TRIM function cannot remove it by itself.

The formula instructs Excel to highlight cells in which the total string length is greater than the length of the trimmed text. To create a conditional formatting rule, select all the cells (rows) that you want to highlight without column headers, go to the Home tab > Styles group, and click Conditional formatting > New Rule > Use a formula to determine which cells to format. If you are not familiar with Excel conditional formatting yet, you will find the detailed steps here: How to create a conditional formatting rule based on formula. As demonstrated in the screenshot below, the result perfectly corroborates with the extra spaces count that we got in the previous example: As you see, the use of the TRIM function in Excel is easy and straightforward. Nevertheless, if someone wants to have a closer look at the formulas discussed in this tutorial, you are welcome to download the Trim Excel Spaces Workbook. Excel TRIM not working
The TRIM function is designed to remove only the space character, represented by code value 32 in the 7-bit ASCII character set. In the Unicode character set, there is one more space character called the non-breaking space, which is commonly used on web pages as the html character . The nonbreaking space has a decimal value of 160, and the TRIM function cannot remove it by itself.

Excel TRIM function - quick way to remove extra spaces Excel TRIM function - quick way to remove extra spaces
Excel TRIM function - quick way to remove extra spaces
TRIM function - remove extra spaces in Excel
TRIM (text)
=TRIM (A1)
=TRIM (CLEAN (A1))
How to use TRIM function in Excel - formula examples
How to trim spaces in an entire column of data
How to remove leading spaces in a numeric column
=VALUE (TRIM (A2))
How to remove only leading spaces in Excel (Left Trim)
=MID (A2,FIND (MID (TRIM (A2),1,1),A2),LEN (A2))
How to count extra spaces in a cell
=LEN (A2)-LEN (TRIM (A2))
How to highlight cells with excess spaces
=LEN ($A2)>LEN (TRIM ($A2))
Excel TRIM not working
=TRIM (SUBSTITUTE (A1, CHAR (160), " "))
=TRIM (CLEAN (SUBSTITUTE (A1, CHAR (160), " ")))
Leading space: =CODE (LEFT (A1,1))
Trailing space: =CODE (RIGHT (A1,1))
=CODE (MID (A1, n, 1)))
=TRIM (SUBSTITUTE (A1, CHAR (9), " "))
Trim Spaces for Excel - remove extra spaces in a click
Available downloads
You may also be interested in
 Here's how: Select all cells with Trim formulas (B2: B8 in this example), and press Ctrl+C to copy them. Select all cells with the original data (A2: A8), and press Ctrl+Alt+V, then V. It is the paste values shortcut that applies the Paste Special > Values
Press the Enter key. Done! How to remove leading spaces in a numeric column
As you have just seen, the Excel TRIM function removed all extra spaces from a column of text data without a hitch. But what if your data is numbers, not text? At first sight, it may seem that the TRIM function has done its job. Upon a closer look, however, you will notice that the trimmed values do not behave like numbers.

Here's how: Select all cells with Trim formulas (B2: B8 in this example), and press Ctrl+C to copy them. Select all cells with the original data (A2: A8), and press Ctrl+Alt+V, then V. It is the paste values shortcut that applies the Paste Special > Values
Press the Enter key. Done! How to remove leading spaces in a numeric column
As you have just seen, the Excel TRIM function removed all extra spaces from a column of text data without a hitch. But what if your data is numbers, not text? At first sight, it may seem that the TRIM function has done its job. Upon a closer look, however, you will notice that the trimmed values do not behave like numbers.

Remove Extra Spaces from Excel Data | Pryor Learning Solutions Remove Extra Spaces from Excel Data
Remove Extra Spaces from Excel Data
Use the Trim Function
Use a Formula to Remove All Spaces
Bonus Hint!
Tepring Crocker
 Images were taken using Excel 2013 on the Windows 7 OS. Option 1
Use the Trim Function
The TRIM function removes all spaces from text except a single space between words. Use this function when you have text data that contains hidden spaces in the cell. In our example, you’ll see that there are multiple “Joe Smiths” in our data. At a glance, several of them even look the same. However, the # of Characters column reveals that there are hidden spaces buried in the text. Step 1
To use the TRIM function, you will need to create a temporary, or helper, column for the corrected data at the end of your spreadsheet. For the purposes of this demonstration, we’ve called the column “Trim.” To follow using our example above, download Excel Remove Spaces Formula Template
Step 2
Click in the first cell of the Trim column. On the Formulas tab, click the Text dropdown menu in the Functions group and select TRIM.

Images were taken using Excel 2013 on the Windows 7 OS. Option 1
Use the Trim Function
The TRIM function removes all spaces from text except a single space between words. Use this function when you have text data that contains hidden spaces in the cell. In our example, you’ll see that there are multiple “Joe Smiths” in our data. At a glance, several of them even look the same. However, the # of Characters column reveals that there are hidden spaces buried in the text. Step 1
To use the TRIM function, you will need to create a temporary, or helper, column for the corrected data at the end of your spreadsheet. For the purposes of this demonstration, we’ve called the column “Trim.” To follow using our example above, download Excel Remove Spaces Formula Template
Step 2
Click in the first cell of the Trim column. On the Formulas tab, click the Text dropdown menu in the Functions group and select TRIM.

How to remove blank spaces in Excel - leading, trailing, non-breaking How to remove spaces in Excel - leading, trailing, non-breaking
How to remove spaces in Excel - leading, trailing, non-breaking
How to remove blank spaces in Excel - leading, trailing, between words
=TRIM (A2)
How to delete line breaks and nonprinting characters
=TRIM (CLEAN (A2))
How to remove non-breaking spaces in Excel
=TRIM (SUBSTITUTE (A2, CHAR (160), " "))
=TRIM (CLEAN ( (SUBSTITUTE (A2,CHAR (160)," "))))
How to delete a specific non-printing character
=TRIM (SUBSTITUTE (SUBSTITUTE (A2, CHAR (127), " "), CHAR (160), " ")))
How to remove all spaces in Excel
=SUBSTITUTE (A2, CHAR (32), "")
=SUBSTITUTE (A2," ","")
How to count spaces in Excel
=LEN (A2)-LEN (SUBSTITUTE (A2," ",""))
=LEN (A2)-LEN (TRIM (A2))
Formula-free way to remove spaces and clean data
You may also be interested in
 Assuming the data to be cleaned is in cell A2, the formula is as follows: =TRIM (CLEAN (A2))
If the Trim/Clean formula joins the contents of multiple lines without spaces, you can fix it by using one of these techniques: Utilize the "Replace All" feature of Excel: in the "Find what" box, input a carriage return by pressing the Ctrl+J shortcut; and in the "Replace with" box, type a space. Clicking the Replace All button will swap all line breaks in the selected range for spaces. Use the following formula to substitute Carriage Return (value 13) and Line Feed (value 10) characters with spaces: =SUBSTITUTE (SUBSTITUTE (A2, CHAR (13)," "), CHAR (10), " ")
For more information, please see How to remove carriage returns (line breaks) in Excel. How to remove non-breaking spaces in Excel
If after using the TRIM & CLEAN formula some stubborn spaces are still there, most likely you copy/pasted the data from somewhere and a few non-breaking spaces sneaked in. To get rid of nonbreaking spaces (html character  ), replace them with regular spaces, and then have the TRIM function remove them:

Assuming the data to be cleaned is in cell A2, the formula is as follows: =TRIM (CLEAN (A2))
If the Trim/Clean formula joins the contents of multiple lines without spaces, you can fix it by using one of these techniques: Utilize the "Replace All" feature of Excel: in the "Find what" box, input a carriage return by pressing the Ctrl+J shortcut; and in the "Replace with" box, type a space. Clicking the Replace All button will swap all line breaks in the selected range for spaces. Use the following formula to substitute Carriage Return (value 13) and Line Feed (value 10) characters with spaces: =SUBSTITUTE (SUBSTITUTE (A2, CHAR (13)," "), CHAR (10), " ")
For more information, please see How to remove carriage returns (line breaks) in Excel. How to remove non-breaking spaces in Excel
If after using the TRIM & CLEAN formula some stubborn spaces are still there, most likely you copy/pasted the data from somewhere and a few non-breaking spaces sneaked in. To get rid of nonbreaking spaces (html character  ), replace them with regular spaces, and then have the TRIM function remove them:

Remove extra spaces in Excel 2016 - 2007 with Ultimate Suite Remove extra spaces in Excel
Remove extra spaces in Excel
Before you start
How to trim spaces in the range
 If you pick Trim leading/trailing spaces, the spaces before and after cell values will be deleted. By ticking Trim spaces between words to 1, you'll have extra spaces between words within a cell removed. The Trim ' ' option means that non-breaking spaces that look like   in your worksheet will be deleted from the selected range. Tip. You can run any of these options right away by clicking the down arrow below the add-in's icon and picking the necessary option from the drop-down menu: We always recommend selecting the Back up the worksheet option to keep your original table intact. Click the Trim button to remove all extra spaces in one click. Change Case in Excel
Add Text in Excel
Extract text and numbers
Remove unwanted characters
Convert text
Split text by characters, mask, strings
Split names: first name, middle name, last name, salutation, name suffix

If you pick Trim leading/trailing spaces, the spaces before and after cell values will be deleted. By ticking Trim spaces between words to 1, you'll have extra spaces between words within a cell removed. The Trim ' ' option means that non-breaking spaces that look like   in your worksheet will be deleted from the selected range. Tip. You can run any of these options right away by clicking the down arrow below the add-in's icon and picking the necessary option from the drop-down menu: We always recommend selecting the Back up the worksheet option to keep your original table intact. Click the Trim button to remove all extra spaces in one click. Change Case in Excel
Add Text in Excel
Extract text and numbers
Remove unwanted characters
Convert text
Split text by characters, mask, strings
Split names: first name, middle name, last name, salutation, name suffix

3 ways to remove spaces between words / numbers in Excel cells 3 ways to remove spaces between words / numbers in Excel cells
3 ways to remove spaces between words / numbers in Excel cells
Trim blanks between words to 1, remove trailing / leading spaces
Use the Trim formula to remove extra spaces
Using Find & Replace to remove extra spaces between words
3 clicks to neat data with Trim Spaces tool
Remove all spaces between numbers
Using formula to remove all spaces
Video: how to remove spaces in Excel
You may also be interested in
 All spaces are removed. Using formula to remove all spaces
You may need to delete all blanks, like in a formula chain. To do this, you can create a helper column and enter the formula: =SUBSTITUTE (A1," ","")
Here A1 is the first cell of the column with numbers or words where all spaces must be deleted. Then follow the steps from the part using formula to remove extra spaces between words to 1
Video: how to remove spaces in Excel
You may also be interested in
Excel TRIM function - quick way to remove extra spaces
How to use LEN function in Excel to count characters in a cell
How to remove all blank rows in Excel

All spaces are removed. Using formula to remove all spaces
You may need to delete all blanks, like in a formula chain. To do this, you can create a helper column and enter the formula: =SUBSTITUTE (A1," ","")
Here A1 is the first cell of the column with numbers or words where all spaces must be deleted. Then follow the steps from the part using formula to remove extra spaces between words to 1
Video: how to remove spaces in Excel
You may also be interested in
Excel TRIM function - quick way to remove extra spaces
How to use LEN function in Excel to count characters in a cell
How to remove all blank rows in Excel

Excel TRIM function - quick way to remove extra spaces Excel TRIM function - quick way to remove extra spaces
Excel TRIM function - quick way to remove extra spaces
TRIM function - remove extra spaces in Excel
TRIM (text)
=TRIM (A1)
=TRIM (CLEAN (A1))
How to use TRIM function in Excel - formula examples
How to trim spaces in an entire column of data
How to remove leading spaces in a numeric column
=VALUE (TRIM (A2))
How to remove only leading spaces in Excel (Left Trim)
=MID (A2,FIND (MID (TRIM (A2),1,1),A2),LEN (A2))
How to count extra spaces in a cell
=LEN (A2)-LEN (TRIM (A2))
How to highlight cells with excess spaces
=LEN ($A2)>LEN (TRIM ($A2))
Excel TRIM not working
=TRIM (SUBSTITUTE (A1, CHAR (160), " "))
=TRIM (CLEAN (SUBSTITUTE (A1, CHAR (160), " ")))
Leading space: =CODE (LEFT (A1,1))
Trailing space: =CODE (RIGHT (A1,1))
=CODE (MID (A1, n, 1)))
=TRIM (SUBSTITUTE (A1, CHAR (9), " "))
Trim Spaces for Excel - remove extra spaces in a click
Available downloads
You may also be interested in
 Done! How to remove leading spaces in a numeric column
As you have just seen, the Excel TRIM function removed all extra spaces from a column of text data without a hitch. But what if your data is numbers, not text? At first sight, it may seem that the TRIM function has done its job. Upon a closer look, however, you will notice that the trimmed values do not behave like numbers. Here are just a few indications of abnormality: Both the original column with leading spaces and trimmed numbers are left-aligned even if you apply the Number format to the cells, while normal numbers are right-aligned by default. When two or more cells with trimmed numbers are selected, Excel displays only COUNT in the status bar. For numbers, it should also display SUM and AVERAGE. A SUM formula applied to the trimmed cells returns zero.

Done! How to remove leading spaces in a numeric column
As you have just seen, the Excel TRIM function removed all extra spaces from a column of text data without a hitch. But what if your data is numbers, not text? At first sight, it may seem that the TRIM function has done its job. Upon a closer look, however, you will notice that the trimmed values do not behave like numbers. Here are just a few indications of abnormality: Both the original column with leading spaces and trimmed numbers are left-aligned even if you apply the Number format to the cells, while normal numbers are right-aligned by default. When two or more cells with trimmed numbers are selected, Excel displays only COUNT in the status bar. For numbers, it should also display SUM and AVERAGE. A SUM formula applied to the trimmed cells returns zero.

Excel TRIM function - quick way to remove extra spaces Excel TRIM function - quick way to remove extra spaces
Excel TRIM function - quick way to remove extra spaces
TRIM function - remove extra spaces in Excel
TRIM (text)
=TRIM (A1)
=TRIM (CLEAN (A1))
How to use TRIM function in Excel - formula examples
How to trim spaces in an entire column of data
How to remove leading spaces in a numeric column
=VALUE (TRIM (A2))
How to remove only leading spaces in Excel (Left Trim)
=MID (A2,FIND (MID (TRIM (A2),1,1),A2),LEN (A2))
How to count extra spaces in a cell
=LEN (A2)-LEN (TRIM (A2))
How to highlight cells with excess spaces
=LEN ($A2)>LEN (TRIM ($A2))
Excel TRIM not working
=TRIM (SUBSTITUTE (A1, CHAR (160), " "))
=TRIM (CLEAN (SUBSTITUTE (A1, CHAR (160), " ")))
Leading space: =CODE (LEFT (A1,1))
Trailing space: =CODE (RIGHT (A1,1))
=CODE (MID (A1, n, 1)))
=TRIM (SUBSTITUTE (A1, CHAR (9), " "))
Trim Spaces for Excel - remove extra spaces in a click
Available downloads
You may also be interested in
 Excel TRIM function - quick way to remove extra spaces
Nov
16
Excel TRIM function - quick way to remove extra spaces
by Svetlana Cheusheva | updated on March 3, 2021
The tutorial demonstrates a few quick and easy ways to trim Excel spaces. Learn how to remove leading, trailing, and extra spaces between words, why Excel TRIM function is not working and how to fix it. Are you comparing two columns for duplicates that you know are there, but your formulas cannot find a single duplicate entry? Or, are you adding up two columns of numbers, but keep getting only zeros? And why on earth does your obviously correct Vlookup formula return just a bunch of N/A errors? These are only a few examples of problems that you may be seeking answers to. And all are caused by extra spaces hiding before, after or between numeric and text values in your cells. Microsoft Excel offers a few different ways to remove spaces and clean up your data. In this tutorial, we will investigate the capabilities of the TRIM function as the fastest and easiest way to delete spaces in Excel. Excel TRIM function syntax
How to use TRIM in Excel - formula examples
Trim spaces in an entire column of data
Delete leading spaces in a numeric column
Remove leading spaces only (Left Trim)
Count extra spaces in cells
Highlight cells with any excess spaces
Excel TRIM not working - reasons and solutions
One-click way to trim spaces in Excel
TRIM function - remove extra spaces in Excel
You use the TRIM function in Excel removes extra spaces from text.

Remove Extra Spaces from Excel Data | Pryor Learning Solutions Remove Extra Spaces from Excel Data
Remove Extra Spaces from Excel Data
Use the Trim Function
Use a Formula to Remove All Spaces
Bonus Hint!
Tepring Crocker
 Step 3
After the dialog box appears, click on the cell that contains the text you would like to remove spaces from to complete the function. Click OK. Step 4
Copy the function to the remaining cells in the column to apply the function to the rest of the Name cells. You can see that the TRIM function cleaned up the extra spaces and the character counts are now all the same except for the “JoeSmith” that did not have any spaces between the first and last name. Note that TRIM will not ADD spaces. Step 5
Now you just need to replace your original data with your clean data. To do this, select all of the cells in the Trim column, then hit CTRL+C to copy the cells to the clipboard. Then, select the first cell in the Name column and right-click. Select Paste Values under the Paste Options heading. Now you can Delete the Trim helper column and your Name column is clean.

Step 3
After the dialog box appears, click on the cell that contains the text you would like to remove spaces from to complete the function. Click OK. Step 4
Copy the function to the remaining cells in the column to apply the function to the rest of the Name cells. You can see that the TRIM function cleaned up the extra spaces and the character counts are now all the same except for the “JoeSmith” that did not have any spaces between the first and last name. Note that TRIM will not ADD spaces. Step 5
Now you just need to replace your original data with your clean data. To do this, select all of the cells in the Trim column, then hit CTRL+C to copy the cells to the clipboard. Then, select the first cell in the Name column and right-click. Select Paste Values under the Paste Options heading. Now you can Delete the Trim helper column and your Name column is clean.

3 ways to remove spaces between words / numbers in Excel cells 3 ways to remove spaces between words / numbers in Excel cells
3 ways to remove spaces between words / numbers in Excel cells
Trim blanks between words to 1, remove trailing / leading spaces
Use the Trim formula to remove extra spaces
Using Find & Replace to remove extra spaces between words
3 clicks to neat data with Trim Spaces tool
Remove all spaces between numbers
Using formula to remove all spaces
Video: how to remove spaces in Excel
You may also be interested in
 The add-in's pane will open on the left side of your worksheet. Just select the needed checkboxes, click the Trim button and enjoy your perfectly cleaned table. Isn't it faster than with the two previous tips? If you always deal with data processing, this tool will save you hours of precious time. Want to get this and 300+ other helpful features for your Excel? I'm glad to offer this special opportunity to you: Promo Code for Ultimate Suite - exclusive offer for our blog readers! Remove all spaces between numbers
Suppose, you have a workbook with numbers where the digits (thousands, millions, billions) are separated with spaces. Thus Excel sees numbers as text and no math operation can be performed. The easiest way to get rid of excess spaces is using the standard Excel Find & Replace option:

The add-in's pane will open on the left side of your worksheet. Just select the needed checkboxes, click the Trim button and enjoy your perfectly cleaned table. Isn't it faster than with the two previous tips? If you always deal with data processing, this tool will save you hours of precious time. Want to get this and 300+ other helpful features for your Excel? I'm glad to offer this special opportunity to you: Promo Code for Ultimate Suite - exclusive offer for our blog readers! Remove all spaces between numbers
Suppose, you have a workbook with numbers where the digits (thousands, millions, billions) are separated with spaces. Thus Excel sees numbers as text and no math operation can be performed. The easiest way to get rid of excess spaces is using the standard Excel Find & Replace option:

Data Cleanup Tips for Microsoft Excel - Office Articles Data Cleanup Tips for Microsoft Excel
Data Cleanup Tips for Microsoft Excel
Data Isn't Recognized Properly
Clean Up Extra Spaces or Characters Using Find and Replace
Use the TRIM Function to Remove Spaces
Use the CLEAN Function to Remove Non-Printing Characters
Vertical to Horizontal Addresses
Sorting as a Data Cleanup Tool
 Find what: Type a left parenthesis (or a right parenthesis or a hyphen or a period)
Replace with: Leave this empty! Replace all
Use the TRIM Function to Remove Spaces
The TRIM function removes spaces to the left and right of your data, but not spaces between data within a single cell. Insert a blank column to the right of the column you want to trim. For our purposes, we'll use column A as the column we want to trim, and B2 is where we'll put our first formula. =TRIM (A2)
Copy the formula down using the fill handle. In order to work with the trimmed text, highlight the cells, hit Edit Copy, then hit Edit Paste Special, Values, OK. That removes the underlying formulas. You can now move your column heading over to your new column of trimmed data, and delete the original column.

Data Cleanup Tips for Microsoft Excel - Office Articles

Data Cleanup Tips for Microsoft Excel
Data Cleanup Tips for Microsoft Excel
Data Isn't Recognized Properly
Clean Up Extra Spaces or Characters Using Find and Replace
Use the TRIM Function to Remove Spaces
Use the CLEAN Function to Remove Non-Printing Characters
Vertical to Horizontal Addresses
Sorting as a Data Cleanup Tool

Find what: Type a left parenthesis (or a right parenthesis or a hyphen or a period)
Replace with: Leave this empty! Replace all
Use the TRIM Function to Remove Spaces
The TRIM function removes spaces to the left and right of your data, but not spaces between data within a single cell. Insert a blank column to the right of the column you want to trim. For our purposes, we'll use column A as the column we want to trim, and B2 is where we'll put our first formula. =TRIM (A2)
Copy the formula down using the fill handle. In order to work with the trimmed text, highlight the cells, hit Edit Copy, then hit Edit Paste Special, Values, OK. That removes the underlying formulas. You can now move your column heading over to your new column of trimmed data, and delete the original column.

How to remove blank spaces in Excel - leading, trailing, non-breaking How to remove spaces in Excel - leading, trailing, non-breaking
How to remove spaces in Excel - leading, trailing, non-breaking
How to remove blank spaces in Excel - leading, trailing, between words
=TRIM (A2)
How to delete line breaks and nonprinting characters
=TRIM (CLEAN (A2))
How to remove non-breaking spaces in Excel
=TRIM (SUBSTITUTE (A2, CHAR (160), " "))
=TRIM (CLEAN ( (SUBSTITUTE (A2,CHAR (160)," "))))
How to delete a specific non-printing character
=TRIM (SUBSTITUTE (SUBSTITUTE (A2, CHAR (127), " "), CHAR (160), " ")))
How to remove all spaces in Excel
=SUBSTITUTE (A2, CHAR (32), "")
=SUBSTITUTE (A2," ","")
How to count spaces in Excel
=LEN (A2)-LEN (SUBSTITUTE (A2," ",""))
=LEN (A2)-LEN (TRIM (A2))
Formula-free way to remove spaces and clean data
You may also be interested in
 How to remove blank spaces in Excel - leading, trailing, non-breaking
Nov
23
How to remove spaces in Excel - leading, trailing, non-breaking
by Svetlana Cheusheva | updated on March 3, 2021
The tutorial explains how to remove blank spaces in Excel using formulas and the Text Toolkit tool. You will learn how to delete leading and trailing spaces in a cell, eliminate extra spaces between words, get rid of non-breaking white space and non-printing characters. What's the biggest problem with spaces? They are often invisible to the human eye. An attentive user can occasionally catch a leading space hiding before the text or a few extra spaces between words. But there is no way to spot trailing spaces, those that keep out of sight at the end of cells. It wouldn't be much of a problem if extra spaces were just lying around, but they mess up your formulas. The point is that two cells containing the same text with and without spaces, even if it's as little as a single space character, are deemed different values. So, you may be racking your brain trying to figure out why an obviously correct formula cannot match two seemingly identical entries. Now that you are fully aware of the problem, it's time to work out a solution.

How to remove blank spaces in Excel - leading, trailing, non-breaking
Nov
23
How to remove spaces in Excel - leading, trailing, non-breaking
by Svetlana Cheusheva | updated on March 3, 2021
The tutorial explains how to remove blank spaces in Excel using formulas and the Text Toolkit tool. You will learn how to delete leading and trailing spaces in a cell, eliminate extra spaces between words, get rid of non-breaking white space and non-printing characters. What's the biggest problem with spaces? They are often invisible to the human eye. An attentive user can occasionally catch a leading space hiding before the text or a few extra spaces between words. But there is no way to spot trailing spaces, those that keep out of sight at the end of cells. It wouldn't be much of a problem if extra spaces were just lying around, but they mess up your formulas. The point is that two cells containing the same text with and without spaces, even if it's as little as a single space character, are deemed different values. So, you may be racking your brain trying to figure out why an obviously correct formula cannot match two seemingly identical entries. Now that you are fully aware of the problem, it's time to work out a solution.

Remove Extra Spaces from Excel Data | Pryor Learning Solutions Remove Extra Spaces from Excel Data
Remove Extra Spaces from Excel Data
Use the Trim Function
Use a Formula to Remove All Spaces
Bonus Hint!
Tepring Crocker
 Step 5
Now you just need to replace your original data with your clean data. To do this, select all of the cells in the Trim column, then hit CTRL+C to copy the cells to the clipboard. Then, select the first cell in the Name column and right-click. Select Paste Values under the Paste Options heading. Now you can Delete the Trim helper column and your Name column is clean. Option 2
Use a Formula to Remove All Spaces
If you need to prepare your data for import into a database (such as MS Access) or have a combination of number and text data that simply needs ALL spaces removed, you can use a formula instead of the TRIM function to remove ALL blanks in a cell. Step 1
Create a temporary, or helper, column for the corrected data at the end of your spreadsheet like you did for the TRIM function. In this example the column is called No Spaces. Step 2
Click in the first cell of the Trim column. On the Formulas tab, click the Text dropdown menu in the Functions group and select SUBSTITUTE.

Step 5
Now you just need to replace your original data with your clean data. To do this, select all of the cells in the Trim column, then hit CTRL+C to copy the cells to the clipboard. Then, select the first cell in the Name column and right-click. Select Paste Values under the Paste Options heading. Now you can Delete the Trim helper column and your Name column is clean. Option 2
Use a Formula to Remove All Spaces
If you need to prepare your data for import into a database (such as MS Access) or have a combination of number and text data that simply needs ALL spaces removed, you can use a formula instead of the TRIM function to remove ALL blanks in a cell. Step 1
Create a temporary, or helper, column for the corrected data at the end of your spreadsheet like you did for the TRIM function. In this example the column is called No Spaces. Step 2
Click in the first cell of the Trim column. On the Formulas tab, click the Text dropdown menu in the Functions group and select SUBSTITUTE.

Excel TRIM function - quick way to remove extra spaces Excel TRIM function - quick way to remove extra spaces
Excel TRIM function - quick way to remove extra spaces
TRIM function - remove extra spaces in Excel
TRIM (text)
=TRIM (A1)
=TRIM (CLEAN (A1))
How to use TRIM function in Excel - formula examples
How to trim spaces in an entire column of data
How to remove leading spaces in a numeric column
=VALUE (TRIM (A2))
How to remove only leading spaces in Excel (Left Trim)
=MID (A2,FIND (MID (TRIM (A2),1,1),A2),LEN (A2))
How to count extra spaces in a cell
=LEN (A2)-LEN (TRIM (A2))
How to highlight cells with excess spaces
=LEN ($A2)>LEN (TRIM ($A2))
Excel TRIM not working
=TRIM (SUBSTITUTE (A1, CHAR (160), " "))
=TRIM (CLEAN (SUBSTITUTE (A1, CHAR (160), " ")))
Leading space: =CODE (LEFT (A1,1))
Trailing space: =CODE (RIGHT (A1,1))
=CODE (MID (A1, n, 1)))
=TRIM (SUBSTITUTE (A1, CHAR (9), " "))
Trim Spaces for Excel - remove extra spaces in a click
Available downloads
You may also be interested in
 If you want to get the total number of spaces in a cell, use this Substitute formula . How to highlight cells with excess spaces
When working with sensitive or important information, you may be hesitant to delete anything without seeing what exactly you are deleting. In this case, you can highlight cells containing extra spaces first, and then safely eliminate those spaces. For this, create a conditional formatting rule with the following formula: =LEN ($A2)>LEN (TRIM ($A2))
Where A2 is the topmost cell with data that you want to highlight. The formula instructs Excel to highlight cells in which the total string length is greater than the length of the trimmed text. To create a conditional formatting rule, select all the cells (rows) that you want to highlight without column headers, go to the Home tab > Styles group, and click Conditional formatting > New Rule > Use a formula to determine which cells to format. If you are not familiar with Excel conditional formatting yet, you will find the detailed steps here: How to create a conditional formatting rule based on formula. As demonstrated in the screenshot below, the result perfectly corroborates with the extra spaces count that we got in the previous example:

If you want to get the total number of spaces in a cell, use this Substitute formula . How to highlight cells with excess spaces
When working with sensitive or important information, you may be hesitant to delete anything without seeing what exactly you are deleting. In this case, you can highlight cells containing extra spaces first, and then safely eliminate those spaces. For this, create a conditional formatting rule with the following formula: =LEN ($A2)>LEN (TRIM ($A2))
Where A2 is the topmost cell with data that you want to highlight. The formula instructs Excel to highlight cells in which the total string length is greater than the length of the trimmed text. To create a conditional formatting rule, select all the cells (rows) that you want to highlight without column headers, go to the Home tab > Styles group, and click Conditional formatting > New Rule > Use a formula to determine which cells to format. If you are not familiar with Excel conditional formatting yet, you will find the detailed steps here: How to create a conditional formatting rule based on formula. As demonstrated in the screenshot below, the result perfectly corroborates with the extra spaces count that we got in the previous example:

4 Ways to Remove Unwanted Space Characters | How To Excel 4 Ways to Remove Unwanted Space Characters
4 Ways to Remove Unwanted Space Characters
Table of Contents
Our Example Data for the Post
Removing Extra Spaces with the TRIM Function
Removing Extra Spaces Between Words with Find and Replace
Removing Extra Spaces with Power Query
Removing Extra Spaces Between Words With VBA
Conclusions
Subscribe
Consulting
Excel Insights
Excel Functions eBook
Microsoft MVP
Categories
Advertisement
 Removing Extra Spaces Between Words With VBA
VBA also has a trim function built in. Sub TrimSpaces ()  Dim rng As Range Dim cell As Range Dim TempCell As String  Set rng = Selection  For Each cell In rng  TempCell = cell. Value  TempCell = Trim (TempCell)  cell. Value = TempCell Next cell  End Sub
The code above will loop through each cell in a selected range and apply the VBA Trim function to the value inside the cell. Similar to the power query Trim transformation, it will only remove the spaces at the start and end of any text. Conclusions
There are lots of methods available for removing any extra spaces found in our data. We took a look at formulas, find and replace, power query and VBA. In my opinion, the simple TRIM worksheet function is the easiest and most effective way. Previous Sending Emails from Excel with Microsoft Flow
Next Importing and Exporting Data from SharePoint and Excel
Subscribe
Consulting
Excel Insights
Excel Functions eBook
Microsoft MVP
Categories
Categories Select Category Charts DAX Formulas Functions Date and Time Information Logical Lookup and Reference Math Text General Get & Transform Microsoft Flow Pivot Tables Power Automate Power BI Power Pivot Power Query PowerApps Resources Shortcuts Statistics Teams Templates Tips & Tricks Tutorials VBA
Advertisement

4 Ways to Remove Unwanted Space Characters | How To Excel

4 Ways to Remove Unwanted Space Characters
4 Ways to Remove Unwanted Space Characters
Table of Contents
Our Example Data for the Post
Removing Extra Spaces with the TRIM Function
Removing Extra Spaces Between Words with Find and Replace
Removing Extra Spaces with Power Query
Removing Extra Spaces Between Words With VBA
Conclusions
Subscribe
Consulting
Excel Insights
Excel Functions eBook
Microsoft MVP
Categories
Advertisement

Removing Extra Spaces Between Words With VBA
VBA also has a trim function built in. Sub TrimSpaces ()  Dim rng As Range Dim cell As Range Dim TempCell As String  Set rng = Selection  For Each cell In rng  TempCell = cell. Value  TempCell = Trim (TempCell)  cell. Value = TempCell Next cell  End Sub
The code above will loop through each cell in a selected range and apply the VBA Trim function to the value inside the cell. Similar to the power query Trim transformation, it will only remove the spaces at the start and end of any text. Conclusions
There are lots of methods available for removing any extra spaces found in our data. We took a look at formulas, find and replace, power query and VBA. In my opinion, the simple TRIM worksheet function is the easiest and most effective way. Previous Sending Emails from Excel with Microsoft Flow
Next Importing and Exporting Data from SharePoint and Excel
Subscribe
Consulting
Excel Insights
Excel Functions eBook
Microsoft MVP
Categories
Categories Select Category Charts DAX Formulas Functions Date and Time Information Logical Lookup and Reference Math Text General Get & Transform Microsoft Flow Pivot Tables Power Automate Power BI Power Pivot Power Query PowerApps Resources Shortcuts Statistics Teams Templates Tips & Tricks Tutorials VBA
Advertisement

VBA Remove Spaces from String in Excel | Explained with Examples VBA Remove Spaces from String in Excel
VBA Remove Spaces from String in Excel
Macro to remove extra Spaces from String in Excel VBA
VBA Code to delete extra Spaces from String in Excel
Instructions to use Macro
Other Useful VBA Text and String Functions
 Finally we use TRIM function in VBA Remove Spaces macro to remove all extra spaces in a string. Table of Contents: Overview
Macro to Trim Blank Spaces from String in Excel VBA
VBA Code to remove extra Multiple Spaces from String in Excel
Instructions to use Macro
Related VBA Functions used in this article
Macro to remove extra Spaces from String in Excel VBA
Here is the best excel vba remove spaces from string macro to remove spaces in Excel. Let us see the example macros to trim,delete and remove blank spaces from String in Excel VBA. 'VBA Code to delete extra Spaces from String in Excel Sub VBA_Remove_Spaces ()  'Variable Declaration  Dim String1 As String, TempString As String  'There are multiple spaces in string  String1 = "Thanks for visiting our blog "  'Remove Extra Spaces  Do  TempString = String1  String1 = Replace (String1, Space (2), Space (1))  Loop Until TempString = String1  MsgBox "Removed Extra Spaces from String: " & vbCrLf & String1, vbInformation, "VBAF1"  End Sub
Here is the output screenshot of above macro procedure. VBA Code to delete extra Spaces from String in Excel
Let us see the example VBA Code to delete extra Spaces from String in Excel. 'VBA Code to Remove Multiple Spaces from String in Excel Sub VBA_Remove_Multiple_Spaces ()  'Variable Declaration  Dim String1 As String  Dim sResult As String  String1 = "Thanks for visiting VBAF1 "  'Remove Extra Spaces  sResult = Application. WorksheetFunction. Trim (String1)  MsgBox "Removed Extra Spaces from String: " &

VBA Remove Spaces from String in Excel | Explained with Examples

VBA Remove Spaces from String in Excel
VBA Remove Spaces from String in Excel
Macro to remove extra Spaces from String in Excel VBA
VBA Code to delete extra Spaces from String in Excel
Instructions to use Macro
Other Useful VBA Text and String Functions

Removing Spaces in Excel 2010 Made Easy
 Removing Spaces in Excel 2010 Made Easy
Menu
About
Contact
Privacy Policy
Submit For Review
Template Gallery
Excel 2016 Udemy Course
Skip to primary navigation
Skip to main content
Skip to primary sidebar
TheAppTimes
App Reviews, Tutorials, & Gadget News Hub
Gadgets
How To
Mobile Apps
Software and Web Apps
Buying Guides
Shop
Show Search
Search this website
Hide Search
Home » How To » How to Remove Spaces in Excel 2010 (Leading, Trailing or All)
How to Remove Spaces in Excel 2010 (Leading, Trailing or All)
February 21, 2011
If you are in the habit of copying content from other spreadsheet or from a website to your Excel database, you might often be faced with the situation where the copied content display additional spaces either the beginning or end of a string. You may also find extra spaces within a string. In this Excel 2010 tutorial, you will learn how to remove spaces in excel (leading, trailing, or all ) under different circumstances. How to Remove Spaces in Excel Using TRIM Function (Leading & Trailing Spaces)
1. Place the cursor in the cell where you want the result to appear. 2. Type =TRIM (Cell Reference) and press Enter. The result is that text will now remove all leading and trailing spaces, as well as extra spaces in the middle of a string. There may be times when the TRIM function does not work. For instance, when data is copied from a HTM page, the spaces in the cells are nonbreaking spaces with a decimal character code of 160 rather than a ASCII space decimal character code of 32.

Removing Spaces in Excel 2010 Made Easy

How to remove leading and trailing spaces in Excel ? How to remove leading and trailing spaces in Excel?
How to remove leading and trailing spaces in Excel?
Office Tab Enable Tabbed Editing and Browsing in Office, and Make Your Work Much Easier...
Kutools for Excel Solves Most of Your Problems, and Increases Your Productivity by 80%
Using Trim function in Excel to remove leading and trailing spaces
Quickly remove all leading and trailing spaces with Kutools for Excel
The Best Office Productivity Tools
Kutools for Excel Solves Most of Your Problems, and Increases Your Productivity by 80%
Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier
 Supports all languages; Easy deploying in your enterprise or organization. Read More... Free Download...
Using Trim function in Excel to remove leading and trailing spaces
Amazing! Using Efficient Tabs in Excel Like Chrome, Firefox and Safari! Save 50% of your time, and reduce thousands of mouse clicks for you every day! The syntax for the TRIM function is: = TRIM ( Text )
Like the following example shows, to remove the space in the cell C11, just click a new cell and enter the trim formula to apply the modification. See screenshot: Note: The TRIM function will not remove all space characters.

How to remove leading and trailing spaces in Excel ?

How to remove leading and trailing spaces in Excel?
How to remove leading and trailing spaces in Excel?
Office Tab Enable Tabbed Editing and Browsing in Office, and Make Your Work Much Easier...
Kutools for Excel Solves Most of Your Problems, and Increases Your Productivity by 80%
Using Trim function in Excel to remove leading and trailing spaces
Quickly remove all leading and trailing spaces with Kutools for Excel
The Best Office Productivity Tools
Kutools for Excel Solves Most of Your Problems, and Increases Your Productivity by 80%
Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier

Supports all languages; Easy deploying in your enterprise or organization. Read More... Free Download...
Using Trim function in Excel to remove leading and trailing spaces
Amazing! Using Efficient Tabs in Excel Like Chrome, Firefox and Safari! Save 50% of your time, and reduce thousands of mouse clicks for you every day! The syntax for the TRIM function is: = TRIM ( Text )
Like the following example shows, to remove the space in the cell C11, just click a new cell and enter the trim formula to apply the modification. See screenshot: Note: The TRIM function will not remove all space characters.

How to Remove Whitespace From a String in Excel | Small Business - Chron.com How to Remove Whitespace From a String in Excel
How to Remove Whitespace From a String in Excel
1
2
3
 How to Remove Whitespace From a String in Excel | Small Business - Chron.com
How to Remove Whitespace From a String in Excel
Small Business
|
Accounting & Bookkeeping
|
Excel
By C. Taylor
Rarely is formatting perfect when you copy data from external sources into Microsoft Excel. As an example, you might copy business data from an online database only to find unwanted whitespace within the text strings in Excel. The term “whitespace” in Web design and some programming languages refers to extra spaces embedded within data, such as those entered using the space bar on a keyboard or by inserting non-breaking spaces into Web pages using the HTML code "&nbsp." It’s easy to remove all whitespace from a string, but you’ll typically want to keep a single space between words. Excel's Trim function will remove all but one space between words; however, it cannot remove non-breaking spaces – this requires a combination Excel's Substitute and Trim functions. 1
Open your spreadsheet in Excel and locate the cells containing the whitespace that needs to be removed. 2
Use the Trim function to remove whitespace created from normal spaces. The Trim function requires a single reference to operate. For example, entering "=TRIM (A1)" without quotes will strip all but single spaces between words from the string " this is a test " in cell A1, leaving "this is a test".

3 ways to remove spaces between words / numbers in Excel cells 3 ways to remove spaces between words / numbers in Excel cells
3 ways to remove spaces between words / numbers in Excel cells
Trim blanks between words to 1, remove trailing / leading spaces
Use the Trim formula to remove extra spaces
Using Find & Replace to remove extra spaces between words
3 clicks to neat data with Trim Spaces tool
Remove all spaces between numbers
Using formula to remove all spaces
Video: how to remove spaces in Excel
You may also be interested in
 I'm glad to offer this special opportunity to you: Promo Code for Ultimate Suite - exclusive offer for our blog readers! Remove all spaces between numbers
Suppose, you have a workbook with numbers where the digits (thousands, millions, billions) are separated with spaces. Thus Excel sees numbers as text and no math operation can be performed. The easiest way to get rid of excess spaces is using the standard Excel Find & Replace option: Press Ctrl + Space to select all cells in a column. Press Ctrl + H to open the " Find & Replace " dialog box. Press Space bar in the Find What field and make sure the " Replace with " field is empty. Click on the " Replace all " button, and then press Ok. Voila!

I'm glad to offer this special opportunity to you: Promo Code for Ultimate Suite - exclusive offer for our blog readers! Remove all spaces between numbers
Suppose, you have a workbook with numbers where the digits (thousands, millions, billions) are separated with spaces. Thus Excel sees numbers as text and no math operation can be performed. The easiest way to get rid of excess spaces is using the standard Excel Find & Replace option: Press Ctrl + Space to select all cells in a column. Press Ctrl + H to open the " Find & Replace " dialog box. Press Space bar in the Find What field and make sure the " Replace with " field is empty. Click on the " Replace all " button, and then press Ok. Voila!

Remove Spaces in Excel - Easy Excel Tutorial Remove Spaces
Remove Spaces Remove Spaces in Excel - Easy Excel Tutorial
Remove Spaces
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. 1. The TRIM function below removes 2 leading spaces, 3 extra spaces and 2 trailing spaces. Note: the TRIM function does not remove single spaces between words. 2. To get the length of a string, use the LEN function. Explanation: the LEN function counts 2 spaces, 2 characters, 4 spaces, 3 characters and 2 spaces.

Remove Spaces in Excel - Easy Excel Tutorial

Remove Spaces in Excel - Easy Excel Tutorial
Remove Spaces
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. 1. The TRIM function below removes 2 leading spaces, 3 extra spaces and 2 trailing spaces. Note: the TRIM function does not remove single spaces between words. 2. To get the length of a string, use the LEN function. Explanation: the LEN function counts 2 spaces, 2 characters, 4 spaces, 3 characters and 2 spaces.

Remove Space in Excel | Top 5 Methods to Filter Data with Spaces Remove Space in Excel
Remove Space in Excel
Top 5 Methods to Filter Data with Spaces in Excel
#1 – How to Remove Space from the text in Excel Using Trim Function?
#2 – How to Remove Space Using Delimited in Text To Columns?
#3 – How to Remove Space in Excel Using Fixed Width in Text to Columns Option?
#4 – How to Remove Space Using Find & Replace Option?
#5 – How to Remove Space in Excel Using Substitute Function?
Explanation of Removing Spaces in Excel
Things to Remember
Recommended Articles
 Remove Space in Excel | Top 5 Methods to Filter Data with Spaces
Home » Excel, VBA & Power BI » Excel Resources » Remove Space in Excel
Remove Space in Excel
Article by Madhuri Thakur
Reviewed by Dheeraj Vaidya, CFA, FRM
Top 5 Methods to Filter Data with Spaces in Excel
Using Trim Function
Using Delimited in Text to Columns
Using Fixed width in Text to Columns
Using Find & Replace Option
Using Substitute Function
Let us discuss each of the methods in detail, along with an example. You can download this Remove Spaces Excel Template here – Remove Spaces Excel Template
#1 – How to Remove Space from the text in Excel Using Trim Function? We have the following data with us,
Cells in column A have texts which have spaces between them, and we will remove the spaces from them in column B.
In B1 Type =Trim. As explained in the text, the Trim function removes all spaces from a text string except for single spaces between words. Select the A1 cell. Click Enter, and excel automatically remove the extra spaces. Drag and Copy the formula to cell B5. Trim Function removed the extra spaces except for the space between the texts itself. #2 – How to Remove Space Using Delimited in Text To Columns? Text to columns in excel also can remove spaces from a cell.

Remove Space in Excel | Top 5 Methods to Filter Data with Spaces

Remove Space in Excel
Remove Space in Excel
Top 5 Methods to Filter Data with Spaces in Excel
#1 – How to Remove Space from the text in Excel Using Trim Function?
#2 – How to Remove Space Using Delimited in Text To Columns?
#3 – How to Remove Space in Excel Using Fixed Width in Text to Columns Option?
#4 – How to Remove Space Using Find & Replace Option?
#5 – How to Remove Space in Excel Using Substitute Function?
Explanation of Removing Spaces in Excel
Things to Remember
Recommended Articles

Remove Space in Excel | Top 5 Methods to Filter Data with Spaces
Home » Excel, VBA & Power BI » Excel Resources » Remove Space in Excel
Remove Space in Excel
Article by Madhuri Thakur
Reviewed by Dheeraj Vaidya, CFA, FRM
Top 5 Methods to Filter Data with Spaces in Excel
Using Trim Function
Using Delimited in Text to Columns
Using Fixed width in Text to Columns
Using Find & Replace Option
Using Substitute Function
Let us discuss each of the methods in detail, along with an example. You can download this Remove Spaces Excel Template here – Remove Spaces Excel Template
#1 – How to Remove Space from the text in Excel Using Trim Function? We have the following data with us,
Cells in column A have texts which have spaces between them, and we will remove the spaces from them in column B.
In B1 Type =Trim. As explained in the text, the Trim function removes all spaces from a text string except for single spaces between words. Select the A1 cell. Click Enter, and excel automatically remove the extra spaces. Drag and Copy the formula to cell B5. Trim Function removed the extra spaces except for the space between the texts itself. #2 – How to Remove Space Using Delimited in Text To Columns? Text to columns in excel also can remove spaces from a cell.

How To Fix Excel TRIM Function Not Working Issue? How To Fix Excel TRIM Function Not Working Issue?
How To Fix Excel TRIM Function Not Working Issue?
How Trim Function Works In Excel?
How To Fix Excel TRIM Not Working Issue?
1# Remove Entire Spaces Including the Spaces Between Words
Here check out how to use SUBSTITUTE formula.
2# Remove Non-breaking Spaces
Follow the below-given instruction:
Removing non-breaking spaces
=TRIM (SUBSTITUTE (C1,CHAR (160),CHAR (32)))
How The Formula Works:
3# Considerations
4# Remove Space When Excel Says There Are No Spaces (but you see them!)
Follow the steps to remove spaces from Excel cell.
FAQ:
Conclusion:
Margret
 Now check the trick how to remove space the Excel says there are no spaces. 4# Remove Space When Excel Says There Are No Spaces (but you see them!) Well, sometimes Excel won’t recognize the space but you can see them. Commonly when you do a Find-Replace, Excel ignores it and leaves the spaces in it. The space you are looking is not space generated by the keyboard; the quick fix is to paste it into substitute function. This doesn’t seem to make difference. Follow the steps to remove spaces from Excel cell. In one cell highlight the gap
Then copy the gap (press CTRL + C)
Create SUBSTITUTE formula but paste an item into Old Text option ( you won’t but Excel recognize a different type of space)
And Excel will replace the spaces named as spaces with nothing. FAQ:

How To Fix Excel TRIM Function Not Working Issue?

How To Fix Excel TRIM Function Not Working Issue?
How To Fix Excel TRIM Function Not Working Issue?
How Trim Function Works In Excel?
How To Fix Excel TRIM Not Working Issue?
1# Remove Entire Spaces Including the Spaces Between Words
Here check out how to use SUBSTITUTE formula.
2# Remove Non-breaking Spaces
Follow the below-given instruction:
Removing non-breaking spaces
=TRIM (SUBSTITUTE (C1,CHAR (160),CHAR (32)))
How The Formula Works:
3# Considerations
4# Remove Space When Excel Says There Are No Spaces (but you see them!)
Follow the steps to remove spaces from Excel cell.
FAQ:
Conclusion:
Margret

Now check the trick how to remove space the Excel says there are no spaces. 4# Remove Space When Excel Says There Are No Spaces (but you see them!) Well, sometimes Excel won’t recognize the space but you can see them. Commonly when you do a Find-Replace, Excel ignores it and leaves the spaces in it. The space you are looking is not space generated by the keyboard; the quick fix is to paste it into substitute function. This doesn’t seem to make difference. Follow the steps to remove spaces from Excel cell. In one cell highlight the gap
Then copy the gap (press CTRL + C)
Create SUBSTITUTE formula but paste an item into Old Text option ( you won’t but Excel recognize a different type of space)
And Excel will replace the spaces named as spaces with nothing. FAQ:

How to remove leading and trailing spaces in Excel cells? How to remove leading and trailing spaces in Excel cells?
How to remove leading and trailing spaces in Excel cells?
Method A: Remove all extra spaces from strings with the TRIM function (2 steps)
Remove extra spaces from strings
=TRIM (B2)
Tip:
Remove all excess spaces including non-printing characters and non-breaking space
=TRIM (CLEAN (SUBSTITUTE (B2,CHAR (160)," ")))
Note:
Method B: Remove leading spaces from strings with the VBA code (5 steps)
1. Press Alt + F11 key to enable Microsoft Visual Basic for Applications window.
VBA: Deleting leading spaces from string
Note:
Method C: Remove leading/trailing/extra/all spaces as you need with Kutools (3 steps)
Remove Leading Spaces only:
Remove Trailing Spaces only:
Remove Leading & Trailing Spaces only:
Remove All Excess Spaces:
Remove All Spaces:
Demo: Remove Spaces
Download sample file
Other Operations (Articles) Related To File Conversion
The Best Office Productivity Tools
Kutools for Excel Solves Most of Your Problems, and Increases Your Productivity by 80%
Office Tab - brings tabbed interface to Office, and make your work much easier
 In this case, you need to combine the TRIM function, CLEAN function and SUBSTITUTE function together to handle this job. Using this formula: =TRIM (CLEAN (SUBSTITUTE (B2,CHAR (160)," ")))
In this case, Cell B2 is the cell you want to remove all excess spaces. Then drag fill handle over the cells you want to apply this formula. Note: The TRIM function will remove all extra spaces including leading space, trailing spaces and the extra spaces between words. If you want to remove leading spaces only, please go to Method B. If you want to remove leading spaces only, or trailing spaces only, or want to remove all excess spaces including non-printing characters, please go to method C.

13 Text tools You Must Have in Excel Which Will Boot Your Efficiency By 90%
▲ Batch edit text string in cells, such as adding same text to cells at once, remove characters at any position and so on. ▲ Except tools displayed in picture, there are 200 advanced tools else in Kutools for Excel, which can solve your 82% Excel puzzles. ▲ Become an Excel expert in 5 minutes, gain people's recognition and promotion. ▲ 110000+ high efficiency people sand 300+ world renowned companies' choice.

How to remove leading and trailing spaces in Excel cells?

How to remove leading and trailing spaces in Excel cells?
How to remove leading and trailing spaces in Excel cells?
Method A: Remove all extra spaces from strings with the TRIM function (2 steps)
Remove extra spaces from strings
=TRIM (B2)
Tip:
Remove all excess spaces including non-printing characters and non-breaking space
=TRIM (CLEAN (SUBSTITUTE (B2,CHAR (160)," ")))
Note:
Method B: Remove leading spaces from strings with the VBA code (5 steps)
1. Press Alt + F11 key to enable Microsoft Visual Basic for Applications window.
VBA: Deleting leading spaces from string
Note:
Method C: Remove leading/trailing/extra/all spaces as you need with Kutools (3 steps)
Remove Leading Spaces only:
Remove Trailing Spaces only:
Remove Leading & Trailing Spaces only:
Remove All Excess Spaces:
Remove All Spaces:
Demo: Remove Spaces
Download sample file
Other Operations (Articles) Related To File Conversion
The Best Office Productivity Tools
Kutools for Excel Solves Most of Your Problems, and Increases Your Productivity by 80%
Office Tab - brings tabbed interface to Office, and make your work much easier

In this case, you need to combine the TRIM function, CLEAN function and SUBSTITUTE function together to handle this job. Using this formula: =TRIM (CLEAN (SUBSTITUTE (B2,CHAR (160)," ")))
In this case, Cell B2 is the cell you want to remove all excess spaces. Then drag fill handle over the cells you want to apply this formula. Note: The TRIM function will remove all extra spaces including leading space, trailing spaces and the extra spaces between words. If you want to remove leading spaces only, please go to Method B. If you want to remove leading spaces only, or trailing spaces only, or want to remove all excess spaces including non-printing characters, please go to method C.

13 Text tools You Must Have in Excel Which Will Boot Your Efficiency By 90%
▲ Batch edit text string in cells, such as adding same text to cells at once, remove characters at any position and so on. ▲ Except tools displayed in picture, there are 200 advanced tools else in Kutools for Excel, which can solve your 82% Excel puzzles. ▲ Become an Excel expert in 5 minutes, gain people's recognition and promotion. ▲ 110000+ high efficiency people sand 300+ world renowned companies' choice.

Remove Extra Spaces from Excel Data | Pryor Learning Solutions Remove Extra Spaces from Excel Data
Remove Extra Spaces from Excel Data
Use the Trim Function
Use a Formula to Remove All Spaces
Bonus Hint!
Tepring Crocker
 Step 4
Click OK to apply the formula to the cell. Step 5
Copy the formula to the remaining cells in the helper column. Then copy the data to the data column as you did before using CTRL-C and Paste Options. Bonus Hint! You can also remove spaces using the Find/Replace feature in Excel. Click CTRL+F to open the Find dialog box, then click the Replace tab. Enter one space ” ” in the Find what: field and leave the Replace with: field empty to remove all spaces. Warning:

Step 4
Click OK to apply the formula to the cell. Step 5
Copy the formula to the remaining cells in the helper column. Then copy the data to the data column as you did before using CTRL-C and Paste Options. Bonus Hint! You can also remove spaces using the Find/Replace feature in Excel. Click CTRL+F to open the Find dialog box, then click the Replace tab. Enter one space ” ” in the Find what: field and leave the Replace with: field empty to remove all spaces. Warning:

How to Remove Leading Blank Spaces in Excel | Small Business - Chron.com How to Remove Leading Blank Spaces in Excel
How to Remove Leading Blank Spaces in Excel
1
2
3
4
5
 Select the "Values" option. Your cleaned-up, calculated values replace the original cell contents. ‒‒:‒‒
/
‒‒:‒‒
Replay
Skip
Ads by
Read More
References
Microsoft Office: Move or Copy Cells and Cell Contents
Microsoft Support: How to use the AutoFill Options button in Excel
Microsoft Office: Insert or Delete Cells, Rows, and Columns
Resources
Microsoft Office: Excel Functions (By Category)
Tips
Use the same procedures to clean up rows of data, simply substituting row-based for column-based operations. Get in the habit of wrapping a TRIM function around functions that split up cell contents based on a space as the delimiter between pieces of data. You can use Replace to remove a space from the cells in a row or column if they contain no spaces you want to preserve. Restrict Replace to your selected cell range by using the Replace options.

Select the "Values" option. Your cleaned-up, calculated values replace the original cell contents. ‒‒:‒‒
/
‒‒:‒‒
Replay
Skip
Ads by
Read More
References
Microsoft Office: Move or Copy Cells and Cell Contents
Microsoft Support: How to use the AutoFill Options button in Excel
Microsoft Office: Insert or Delete Cells, Rows, and Columns
Resources
Microsoft Office: Excel Functions (By Category)
Tips
Use the same procedures to clean up rows of data, simply substituting row-based for column-based operations. Get in the habit of wrapping a TRIM function around functions that split up cell contents based on a space as the delimiter between pieces of data. You can use Replace to remove a space from the cells in a row or column if they contain no spaces you want to preserve. Restrict Replace to your selected cell range by using the Replace options.

How to remove blank spaces in Excel - leading, trailing, non-breaking How to remove spaces in Excel - leading, trailing, non-breaking
How to remove spaces in Excel - leading, trailing, non-breaking
How to remove blank spaces in Excel - leading, trailing, between words
=TRIM (A2)
How to delete line breaks and nonprinting characters
=TRIM (CLEAN (A2))
How to remove non-breaking spaces in Excel
=TRIM (SUBSTITUTE (A2, CHAR (160), " "))
=TRIM (CLEAN ( (SUBSTITUTE (A2,CHAR (160)," "))))
How to delete a specific non-printing character
=TRIM (SUBSTITUTE (SUBSTITUTE (A2, CHAR (127), " "), CHAR (160), " ")))
How to remove all spaces in Excel
=SUBSTITUTE (A2, CHAR (32), "")
=SUBSTITUTE (A2," ","")
How to count spaces in Excel
=LEN (A2)-LEN (SUBSTITUTE (A2," ",""))
=LEN (A2)-LEN (TRIM (A2))
Formula-free way to remove spaces and clean data
You may also be interested in
 Clicking the Replace All button will swap all line breaks in the selected range for spaces. Use the following formula to substitute Carriage Return (value 13) and Line Feed (value 10) characters with spaces: =SUBSTITUTE (SUBSTITUTE (A2, CHAR (13)," "), CHAR (10), " ")
For more information, please see How to remove carriage returns (line breaks) in Excel. How to remove non-breaking spaces in Excel
If after using the TRIM & CLEAN formula some stubborn spaces are still there, most likely you copy/pasted the data from somewhere and a few non-breaking spaces sneaked in. To get rid of nonbreaking spaces (html character  ), replace them with regular spaces, and then have the TRIM function remove them: =TRIM (SUBSTITUTE (A2, CHAR (160), " "))
To better understand the logic, let's break down the formula: A non-breaking character has value 160 in the 7-bit ASCII system, so you can define it by using the CHAR (160) formula. The SUBSTITUTE function is used to turn non-breaking spaces into regular spaces. And finally, you embed the SUBSTITUTE statement into the TRIM function to remove the converted spaces. If your worksheet also contains non-printing characters, use the CLEAN function together with TRIM and SUBSTITUTE to get rid of spaces and unwanted symbols in one fell swoop:

How to remove blank spaces in Excel - leading, trailing, non-breaking

Clicking the Replace All button will swap all line breaks in the selected range for spaces. Use the following formula to substitute Carriage Return (value 13) and Line Feed (value 10) characters with spaces: =SUBSTITUTE (SUBSTITUTE (A2, CHAR (13)," "), CHAR (10), " ")
For more information, please see How to remove carriage returns (line breaks) in Excel. How to remove non-breaking spaces in Excel
If after using the TRIM & CLEAN formula some stubborn spaces are still there, most likely you copy/pasted the data from somewhere and a few non-breaking spaces sneaked in. To get rid of nonbreaking spaces (html character  ), replace them with regular spaces, and then have the TRIM function remove them: =TRIM (SUBSTITUTE (A2, CHAR (160), " "))
To better understand the logic, let's break down the formula: A non-breaking character has value 160 in the 7-bit ASCII system, so you can define it by using the CHAR (160) formula. The SUBSTITUTE function is used to turn non-breaking spaces into regular spaces. And finally, you embed the SUBSTITUTE statement into the TRIM function to remove the converted spaces. If your worksheet also contains non-printing characters, use the CLEAN function together with TRIM and SUBSTITUTE to get rid of spaces and unwanted symbols in one fell swoop:

4 Ways to Remove Unwanted Space Characters | How To Excel 4 Ways to Remove Unwanted Space Characters
4 Ways to Remove Unwanted Space Characters
Table of Contents
Our Example Data for the Post
Removing Extra Spaces with the TRIM Function
Removing Extra Spaces Between Words with Find and Replace
Removing Extra Spaces with Power Query
Removing Extra Spaces Between Words With VBA
Conclusions
Subscribe
Consulting
Excel Insights
Excel Functions eBook
Microsoft MVP
Categories
Advertisement
 Like the find and replace method, we will need to add two spaces as the Value To Find and a single space as the Replace With value. We can then press the OK button to add this transformation. We need to repeat this step until all the extra spaces have been removed from our data. To get the cleaned data back into Excel, we need to close and load the data. We can go to the Home tab in the power query editor ➜ press Close & Load ➜ choose Close & Load To ➜ choose a Table and select the location to load the table. Removing Extra Spaces Between Words With VBA
VBA also has a trim function built in. Sub TrimSpaces ()  Dim rng As Range Dim cell As Range Dim TempCell As String  Set rng = Selection  For Each cell In rng  TempCell = cell. Value  TempCell = Trim (TempCell)  cell. Value = TempCell Next cell  End Sub
The code above will loop through each cell in a selected range and apply the VBA Trim function to the value inside the cell. Similar to the power query Trim transformation, it will only remove the spaces at the start and end of any text.

Like the find and replace method, we will need to add two spaces as the Value To Find and a single space as the Replace With value. We can then press the OK button to add this transformation. We need to repeat this step until all the extra spaces have been removed from our data. To get the cleaned data back into Excel, we need to close and load the data. We can go to the Home tab in the power query editor ➜ press Close & Load ➜ choose Close & Load To ➜ choose a Table and select the location to load the table. Removing Extra Spaces Between Words With VBA
VBA also has a trim function built in. Sub TrimSpaces ()  Dim rng As Range Dim cell As Range Dim TempCell As String  Set rng = Selection  For Each cell In rng  TempCell = cell. Value  TempCell = Trim (TempCell)  cell. Value = TempCell Next cell  End Sub
The code above will loop through each cell in a selected range and apply the VBA Trim function to the value inside the cell. Similar to the power query Trim transformation, it will only remove the spaces at the start and end of any text.

4 Ways to Remove Unwanted Space Characters | How To Excel 4 Ways to Remove Unwanted Space Characters
4 Ways to Remove Unwanted Space Characters
Table of Contents
Our Example Data for the Post
Removing Extra Spaces with the TRIM Function
Removing Extra Spaces Between Words with Find and Replace
Removing Extra Spaces with Power Query
Removing Extra Spaces Between Words With VBA
Conclusions
Subscribe
Consulting
Excel Insights
Excel Functions eBook
Microsoft MVP
Categories
Advertisement
 Removing Extra Spaces with the TRIM Function
The first method we’ll look at is the simplest. Extra spaces is such a common problem, that there’s a function to remove (or trim) them. It’s the TRIM function. It does exactly what it sounds like it might do. It trims off any excessive spaces from the data. It removes all spaces from a text string except for single spaces between words. The TRIM function has one required input, and this is the text from which we want to trim off excess spaces. The input can either be a cell reference like B2 or a hardcoded string like ” Hello World! “. TRIM (B2) would return the contents of cell B2 with extra spaces removed. TRIM (" Hello World! ")

Removing Extra Spaces with the TRIM Function
The first method we’ll look at is the simplest. Extra spaces is such a common problem, that there’s a function to remove (or trim) them. It’s the TRIM function. It does exactly what it sounds like it might do. It trims off any excessive spaces from the data. It removes all spaces from a text string except for single spaces between words. The TRIM function has one required input, and this is the text from which we want to trim off excess spaces. The input can either be a cell reference like B2 or a hardcoded string like ” Hello World! “. TRIM (B2) would return the contents of cell B2 with extra spaces removed. TRIM (" Hello World! ")

Excel Remove Trailing Spaces and Leading Spaces How to Remove Leading and Trailing Spaces in Excel
How to Remove Leading and Trailing Spaces in Excel
So, it is extremely important to Excel remove trailing spaces!
TRIM Function to Remove Extra Spaces
=TRIM (
=TRIM (B7)
Substitute Function to Remove Non-Breaking Spaces
=SUBSTITUTE (
=SUBSTITUTE (C9
=SUBSTITUTE (C9,CHAR (160),
=SUBSTITUTE (C9,CHAR (160),” “)
=TRIM (SUBSTITUTE (C9, CHAR (160), ” “))
Find & Replace to remove all spaces
Conclusion
Excellent
Doing a lesson a day or more is a great…
Excellent course that are easy to flow…
An excellent website
Everything that begins well ends well.
Highly recommend
Very clear instruction video’s
My Wonderful Excel Learning Experience
This course is so easy to follow along!
Cool few minutes approach
It has been over a decade since I've had an Excel refresher, Much Needed !!
Best decision since my marriage! :)
Very Effective Training
well presented
Good teaching and it's very visual
My Excel Online Academy Beginner Course
If you like this Excel tip, please share it
email
Pinterest
Facebook
Twitter
Linkedin
About The Author
 Conclusion
Using the Trim function, you have learned how to remove trailing spaces in Excel and leading spaces too. There can be non-breaking spaces in a text as well. To remove them, simply use Substitute Function and replace the non-breaking space with a normal space. Lastly, if you wish to remove all spaces in Excel the Find & Replace feature would be your best match! Give these methods a try and become a pro in cleaning data in MS Excel! HELPFUL RESOURCE: Make sure to download our FREE PDF on the 333 Excel keyboard Shortcuts here: You can learn more about how to use Excel by viewing our FREE Excel webinar training on Formulas , Pivot Tables , Power Query, and Macros & VBA! Trustpilot Custom Widget
Excellent
4.8 out of five star rating on Trustpilot
Based on 217 reviews
Trustpilot
5 out of five star rating on Trustpilot
1 day ago
Doing a lesson a day or more is a great…
Doing a lesson a day or more is a great idea. I'm so busy with my job but if I m...
customer
5 out of five star rating on Trustpilot
3 days ago
Excellent course that are easy to flow…
Excellent course that are easy to flow along.

Excel Remove Trailing Spaces and Leading Spaces

How to Remove Leading and Trailing Spaces in Excel
How to Remove Leading and Trailing Spaces in Excel
So, it is extremely important to Excel remove trailing spaces!
TRIM Function to Remove Extra Spaces
=TRIM (
=TRIM (B7)
Substitute Function to Remove Non-Breaking Spaces
=SUBSTITUTE (
=SUBSTITUTE (C9
=SUBSTITUTE (C9,CHAR (160),
=SUBSTITUTE (C9,CHAR (160),” “)
=TRIM (SUBSTITUTE (C9, CHAR (160), ” “))
Find & Replace to remove all spaces
Conclusion
Excellent
Doing a lesson a day or more is a great…
Excellent course that are easy to flow…
An excellent website
Everything that begins well ends well.
Highly recommend
Very clear instruction video’s
My Wonderful Excel Learning Experience
This course is so easy to follow along!
Cool few minutes approach
It has been over a decade since I've had an Excel refresher, Much Needed !!
Best decision since my marriage! :)
Very Effective Training
well presented
Good teaching and it's very visual
My Excel Online Academy Beginner Course
If you like this Excel tip, please share it
email
Pinterest
Facebook
Twitter
Linkedin
About The Author

Conclusion
Using the Trim function, you have learned how to remove trailing spaces in Excel and leading spaces too. There can be non-breaking spaces in a text as well. To remove them, simply use Substitute Function and replace the non-breaking space with a normal space. Lastly, if you wish to remove all spaces in Excel the Find & Replace feature would be your best match! Give these methods a try and become a pro in cleaning data in MS Excel! HELPFUL RESOURCE: Make sure to download our FREE PDF on the 333 Excel keyboard Shortcuts here: You can learn more about how to use Excel by viewing our FREE Excel webinar training on Formulas , Pivot Tables , Power Query, and Macros & VBA! Trustpilot Custom Widget
Excellent
4.8 out of five star rating on Trustpilot
Based on 217 reviews
Trustpilot
5 out of five star rating on Trustpilot
1 day ago
Doing a lesson a day or more is a great…
Doing a lesson a day or more is a great idea. I'm so busy with my job but if I m...
customer
5 out of five star rating on Trustpilot
3 days ago
Excellent course that are easy to flow…
Excellent course that are easy to flow along.

How to remove extra spaces between words in cells in Excel? How to remove extra spaces between words in cells in Excel?
How to remove extra spaces between words in cells in Excel?
Kutools for Excel Solves Most of Your Problems, and Increases Your Productivity by 80%
Remove extra spaces between words with TRIM in Excel
Remove extra spaces between words with VBA
VBA: Remove extra spaces between words:
Remove extra spaces between words with Kutools for Excel
Relative articles:
The Best Office Productivity Tools
Kutools for Excel Solves Most of Your Problems, and Increases Your Productivity by 80%
Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier
 Using Efficient Tabs in Excel Like Chrome, Firefox and Safari! Save 50% of your time, and reduce thousands of mouse clicks for you every day! In Excel, you can remove extra spaces between words with TRIM. Please do as follows: Step 1. Type formula =TRIM (A1) in cell B1 which is adjacent to cell A1, see screenshot: Step 2. Press Enter key and select B1, then drag the fill handle over the range of cells that you want to apply this formula. And all extra spaces between characters have been removed from the range. See screenshot:

How to remove extra spaces between words in cells in Excel?

How to remove extra spaces between words in cells in Excel?
How to remove extra spaces between words in cells in Excel?
Kutools for Excel Solves Most of Your Problems, and Increases Your Productivity by 80%
Remove extra spaces between words with TRIM in Excel
Remove extra spaces between words with VBA
VBA: Remove extra spaces between words:
Remove extra spaces between words with Kutools for Excel
Relative articles:
The Best Office Productivity Tools
Kutools for Excel Solves Most of Your Problems, and Increases Your Productivity by 80%
Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier

Using Efficient Tabs in Excel Like Chrome, Firefox and Safari! Save 50% of your time, and reduce thousands of mouse clicks for you every day! In Excel, you can remove extra spaces between words with TRIM. Please do as follows: Step 1. Type formula =TRIM (A1) in cell B1 which is adjacent to cell A1, see screenshot: Step 2. Press Enter key and select B1, then drag the fill handle over the range of cells that you want to apply this formula. And all extra spaces between characters have been removed from the range. See screenshot:

Remove Spaces in Excel - Leading, Trailing and Double Remove Extra Spaces in Excel (Leading, Trailing, Double Spaces)
Remove Extra Spaces in Excel (Leading, Trailing, Double Spaces)
FREE EXCEL TIPS EBOOK - Click here to get your copy
Watch Video – Remove Spaces in Excel
This Tutorial Covers:
How to Remove Spaces in Excel
Using the TRIM Function
Remove Extra Spaces in Excel using FIND and REPLACE
Removing Double Spaces
Removing Single Spaces
Remove Line Breaks
You may also like the following Excel tutorials:
FREE EXCEL BOOK
Get 51 Excel Tips Ebook to skyrocket your productivity and get work done faster
 A7), use the following formula in cell C1 and drag it down for all the first names: =TRIM (A2)
Excel TRIM function would instantly remove all the leading and trailing spaces in the cell. Once you have the cleaned data, copy it paste it as values in place of the original data. This function is also helpful if you have more than one space character between words. It would remove the extra spaces such that the result always have one space character between words. Excel TRIM function does a good job in removing spaces in Excel, however, it fails when you have non-printing characters (such as line breaks) in your data set. To remove non-printing characters, you can use a combination of TRIM and CLEAN functions. If you have some text in cell A1 from which you want to remove spaces, use the below formula: =TRIM (CLEAN (A1))
Non-printing characters can also result from =CHAR (160), which can not be removed by the CLEAN formula. So, if you want to be absolutely sure that you have all the extra spaces and non-printing characters, use the below formula:

Remove Spaces in Excel - Leading, Trailing and Double

Remove Extra Spaces in Excel (Leading, Trailing, Double Spaces)
Remove Extra Spaces in Excel (Leading, Trailing, Double Spaces)
FREE EXCEL TIPS EBOOK - Click here to get your copy
Watch Video – Remove Spaces in Excel
This Tutorial Covers:
How to Remove Spaces in Excel
Using the TRIM Function
Remove Extra Spaces in Excel using FIND and REPLACE
Removing Double Spaces
Removing Single Spaces
Remove Line Breaks
You may also like the following Excel tutorials:
FREE EXCEL BOOK
Get 51 Excel Tips Ebook to skyrocket your productivity and get work done faster

A7), use the following formula in cell C1 and drag it down for all the first names: =TRIM (A2)
Excel TRIM function would instantly remove all the leading and trailing spaces in the cell. Once you have the cleaned data, copy it paste it as values in place of the original data. This function is also helpful if you have more than one space character between words. It would remove the extra spaces such that the result always have one space character between words. Excel TRIM function does a good job in removing spaces in Excel, however, it fails when you have non-printing characters (such as line breaks) in your data set. To remove non-printing characters, you can use a combination of TRIM and CLEAN functions. If you have some text in cell A1 from which you want to remove spaces, use the below formula: =TRIM (CLEAN (A1))
Non-printing characters can also result from =CHAR (160), which can not be removed by the CLEAN formula. So, if you want to be absolutely sure that you have all the extra spaces and non-printing characters, use the below formula:

Remove Leading Spaces in Excel | Top 4 Methods to Remove Cell Spaces Remove Leading Spaces in Excel
Remove Leading Spaces in Excel
How to Remove Leading Spaces in Excel Cell?
#1 – Remove Unwanted Leading Spaces in Excel Cell Using TRIM Function
#2 – Remove Non-Breaking Leading Spaces in Excel Cell
#3 – Remove Double Spaces Using Excel FIND & REPLACE Method
#4 – Remove All Leading Spaces Using Excel FIND & REPLACE Method
Things to Remember
Recommended Articles
 But the problem is all the necessary spaces are also will get replaced along with it. For example, look at the below sentence in a cell. In the above sentence, we need one space character after each completed word to make the sentence proper. We have only one extra space after the word capital. In order to deal with these unwanted spaces problems, we have a built-in function called TRIM in Excel, which can remove all the unwanted spaces in excel cell. The syntax is very simple. We just need to select the required cell to be trimmed. The Trim function removes all the spaces except the single space after each word. Let’s apply the Trim formula in excel to remove all kinds of spaces in a cell. This trim function removed the spaces between “Capital” and “is.”

Remove Leading Spaces in Excel | Top 4 Methods to Remove Cell Spaces

Remove Leading Spaces in Excel
Remove Leading Spaces in Excel
How to Remove Leading Spaces in Excel Cell?
#1 – Remove Unwanted Leading Spaces in Excel Cell Using TRIM Function
#2 – Remove Non-Breaking Leading Spaces in Excel Cell
#3 – Remove Double Spaces Using Excel FIND & REPLACE Method
#4 – Remove All Leading Spaces Using Excel FIND & REPLACE Method
Things to Remember
Recommended Articles

But the problem is all the necessary spaces are also will get replaced along with it. For example, look at the below sentence in a cell. In the above sentence, we need one space character after each completed word to make the sentence proper. We have only one extra space after the word capital. In order to deal with these unwanted spaces problems, we have a built-in function called TRIM in Excel, which can remove all the unwanted spaces in excel cell. The syntax is very simple. We just need to select the required cell to be trimmed. The Trim function removes all the spaces except the single space after each word. Let’s apply the Trim formula in excel to remove all kinds of spaces in a cell. This trim function removed the spaces between “Capital” and “is.”

Excel Remove Trailing Spaces and Leading Spaces How to Remove Leading and Trailing Spaces in Excel
How to Remove Leading and Trailing Spaces in Excel
So, it is extremely important to Excel remove trailing spaces!
TRIM Function to Remove Extra Spaces
=TRIM (
=TRIM (B7)
Substitute Function to Remove Non-Breaking Spaces
=SUBSTITUTE (
=SUBSTITUTE (C9
=SUBSTITUTE (C9,CHAR (160),
=SUBSTITUTE (C9,CHAR (160),” “)
=TRIM (SUBSTITUTE (C9, CHAR (160), ” “))
Find & Replace to remove all spaces
Conclusion
Excellent
Doing a lesson a day or more is a great…
Excellent course that are easy to flow…
An excellent website
Everything that begins well ends well.
Highly recommend
Very clear instruction video’s
My Wonderful Excel Learning Experience
This course is so easy to follow along!
Cool few minutes approach
It has been over a decade since I've had an Excel refresher, Much Needed !!
Best decision since my marriage! :)
Very Effective Training
well presented
Good teaching and it's very visual
My Excel Online Academy Beginner Course
If you like this Excel tip, please share it
email
Pinterest
Facebook
Twitter
Linkedin
About The Author
 Press the Space bar in the Find what field to insert a space and keep the Replace with field empty. STEP 4: Click the Replace All button and then click OK. All the spaces are now removed! This is how you can Excel remove trailing spaces, trailing spaces, and non-breaking spaces, too! Conclusion
Using the Trim function, you have learned how to remove trailing spaces in Excel and leading spaces too. There can be non-breaking spaces in a text as well. To remove them, simply use Substitute Function and replace the non-breaking space with a normal space. Lastly, if you wish to remove all spaces in Excel the Find & Replace feature would be your best match! Give these methods a try and become a pro in cleaning data in MS Excel!

Press the Space bar in the Find what field to insert a space and keep the Replace with field empty. STEP 4: Click the Replace All button and then click OK. All the spaces are now removed! This is how you can Excel remove trailing spaces, trailing spaces, and non-breaking spaces, too! Conclusion
Using the Trim function, you have learned how to remove trailing spaces in Excel and leading spaces too. There can be non-breaking spaces in a text as well. To remove them, simply use Substitute Function and replace the non-breaking space with a normal space. Lastly, if you wish to remove all spaces in Excel the Find & Replace feature would be your best match! Give these methods a try and become a pro in cleaning data in MS Excel!

Remove Extra Spaces from Excel Data | Pryor Learning Solutions Remove Extra Spaces from Excel Data
Remove Extra Spaces from Excel Data
Use the Trim Function
Use a Formula to Remove All Spaces
Bonus Hint!
Tepring Crocker
 Often, these issues are caused by extra spaces hiding before, after or between the text and numbers in your data. Especially when information has been copy/pasted into a spreadsheet, extra spaces can come along for the ride and lurk unnoticed until something goes wrong. Excel offers several ways to help you remove spaces and clean up your data, but you will want to choose the right technique for the type of data you are working with. The following tips will describe two methods using functions and formulas to remove unwanted spaces from your data. These steps will apply to Excel 2007-2013. Images were taken using Excel 2013 on the Windows 7 OS. Option 1
Use the Trim Function
The TRIM function removes all spaces from text except a single space between words. Use this function when you have text data that contains hidden spaces in the cell. In our example, you’ll see that there are multiple “Joe Smiths” in our data. At a glance, several of them even look the same.

Often, these issues are caused by extra spaces hiding before, after or between the text and numbers in your data. Especially when information has been copy/pasted into a spreadsheet, extra spaces can come along for the ride and lurk unnoticed until something goes wrong. Excel offers several ways to help you remove spaces and clean up your data, but you will want to choose the right technique for the type of data you are working with. The following tips will describe two methods using functions and formulas to remove unwanted spaces from your data. These steps will apply to Excel 2007-2013. Images were taken using Excel 2013 on the Windows 7 OS. Option 1
Use the Trim Function
The TRIM function removes all spaces from text except a single space between words. Use this function when you have text data that contains hidden spaces in the cell. In our example, you’ll see that there are multiple “Joe Smiths” in our data. At a glance, several of them even look the same.

Excel Remove Trailing Spaces and Leading Spaces How to Remove Leading and Trailing Spaces in Excel
How to Remove Leading and Trailing Spaces in Excel
So, it is extremely important to Excel remove trailing spaces!
TRIM Function to Remove Extra Spaces
=TRIM (
=TRIM (B7)
Substitute Function to Remove Non-Breaking Spaces
=SUBSTITUTE (
=SUBSTITUTE (C9
=SUBSTITUTE (C9,CHAR (160),
=SUBSTITUTE (C9,CHAR (160),” “)
=TRIM (SUBSTITUTE (C9, CHAR (160), ” “))
Find & Replace to remove all spaces
Conclusion
Excellent
Doing a lesson a day or more is a great…
Excellent course that are easy to flow…
An excellent website
Everything that begins well ends well.
Highly recommend
Very clear instruction video’s
My Wonderful Excel Learning Experience
This course is so easy to follow along!
Cool few minutes approach
It has been over a decade since I've had an Excel refresher, Much Needed !!
Best decision since my marriage! :)
Very Effective Training
well presented
Good teaching and it's very visual
My Excel Online Academy Beginner Course
If you like this Excel tip, please share it
email
Pinterest
Facebook
Twitter
Linkedin
About The Author
 STEP 1: Select the cell range from which you want to remove spaces. STEP 2: Go to Home > Find & Select > Replace or Press Ctrl + H to open the Find & Replace dialog box. STEP 3: Press the Space bar in the Find what field to insert a space and keep the Replace with field empty. STEP 4: Click the Replace All button and then click OK. All the spaces are now removed! This is how you can Excel remove trailing spaces, trailing spaces, and non-breaking spaces, too!

STEP 1: Select the cell range from which you want to remove spaces. STEP 2: Go to Home > Find & Select > Replace or Press Ctrl + H to open the Find & Replace dialog box. STEP 3: Press the Space bar in the Find what field to insert a space and keep the Replace with field empty. STEP 4: Click the Replace All button and then click OK. All the spaces are now removed! This is how you can Excel remove trailing spaces, trailing spaces, and non-breaking spaces, too!

Remove Leading and Trailing Spaces - Free Excel Tutorial Remove Leading and Trailing Spaces
Remove Leading and Trailing Spaces
Method 1: Remove Leading and Trailing spaces with Excel Formula
Method 2: Remove Leading and Trailing spaces with Excel VBA macro
Related Functions
 So you can write down the following Excel formula: = TRIM ( SUBSTITUTE (A1, CHAR (160)," "))
You will see that all of leading and trailing spaces are removed from the text string in range A1: A4. Or try to use the following formula: = TRIM ( CLEAN ( SUBSTITUTE (A1, CHAR (160)," ")))
The CHAR (160) formula returns a non-breaking space character. The SUBSTITUTE function will replace all non-breaking space with new space character. The CLEAN function will remove all non-printing characters, such as line breaks. Method 2: Remove Leading and Trailing spaces with Excel VBA macro
If you want to quickly remove leading and trailing spaces, you can write an Excel VBA macro code, just do it following: 1# click on “ Visual Basic ” command under DEVELOPER Tab.

Remove Leading and Trailing Spaces - Free Excel Tutorial

Remove Leading and Trailing Spaces
Remove Leading and Trailing Spaces
Method 1: Remove Leading and Trailing spaces with Excel Formula
Method 2: Remove Leading and Trailing spaces with Excel VBA macro
Related Functions

So you can write down the following Excel formula: = TRIM ( SUBSTITUTE (A1, CHAR (160)," "))
You will see that all of leading and trailing spaces are removed from the text string in range A1: A4. Or try to use the following formula: = TRIM ( CLEAN ( SUBSTITUTE (A1, CHAR (160)," ")))
The CHAR (160) formula returns a non-breaking space character. The SUBSTITUTE function will replace all non-breaking space with new space character. The CLEAN function will remove all non-printing characters, such as line breaks. Method 2: Remove Leading and Trailing spaces with Excel VBA macro
If you want to quickly remove leading and trailing spaces, you can write an Excel VBA macro code, just do it following: 1# click on “ Visual Basic ” command under DEVELOPER Tab.

Remove Spaces in Excel (Examples) | How To Remove Spaces? Excel Remove Spaces
Excel Remove Spaces
Excel Remove Spaces (Table of Contents)
Introduction to Remove Spaces in Excel
Different Types Of Spaces
TRIM Function
How to Remove Extra Spaces in Excel?
Example #1 – Remove Excel Spaces with the help of Find and Replace
Example #2 – Remove Excel Spaces with the help of TRIM Function
Example #3 – Remove Excel Spaces with the help of SUBSTITUTE Function
Things to Remember about Excel Remove Spaces
Recommended Articles
 Remove Spaces in Excel (Examples) | How To Remove Spaces? Excel Remove Spaces
Excel Remove Spaces (Table of Contents)
Introduction to Remove Spaces in Excel
Different Types Of Spaces
How to Remove Extra Spaces in Excel? Introduction to Remove Spaces in Excel
There are multiple ways to remove spaces in excel. The first way we can remove the extra unwanted spaces with the help of the FIND and REPLACE option (Ctrl + H). There we need to put a space and replace that with Blank (Nothing kept). This removes the spaces anywhere from the selected cells. In another way, we can remove the spaces by using a TRIM function. This removes the spaces which are there at the start and end of the selected cell content. And we can also use the SUBSTITUTE function, where we can substitute space with blank to remove spaces completely. Start Your Free Excel Course
Excel functions, formula, charts, formatting creating excel dashboard & others
Different Types Of Spaces
It may contain extra spaces before text strings in cells;

Remove Spaces in Excel (Examples) | How To Remove Spaces?

Excel Remove Spaces
Excel Remove Spaces
Excel Remove Spaces (Table of Contents)
Introduction to Remove Spaces in Excel
Different Types Of Spaces
TRIM Function
How to Remove Extra Spaces in Excel?
Example #1 – Remove Excel Spaces with the help of Find and Replace
Example #2 – Remove Excel Spaces with the help of TRIM Function
Example #3 – Remove Excel Spaces with the help of SUBSTITUTE Function
Things to Remember about Excel Remove Spaces
Recommended Articles

Remove Spaces in Excel (Examples) | How To Remove Spaces? Excel Remove Spaces
Excel Remove Spaces (Table of Contents)
Introduction to Remove Spaces in Excel
Different Types Of Spaces
How to Remove Extra Spaces in Excel? Introduction to Remove Spaces in Excel
There are multiple ways to remove spaces in excel. The first way we can remove the extra unwanted spaces with the help of the FIND and REPLACE option (Ctrl + H). There we need to put a space and replace that with Blank (Nothing kept). This removes the spaces anywhere from the selected cells. In another way, we can remove the spaces by using a TRIM function. This removes the spaces which are there at the start and end of the selected cell content. And we can also use the SUBSTITUTE function, where we can substitute space with blank to remove spaces completely. Start Your Free Excel Course
Excel functions, formula, charts, formatting creating excel dashboard & others
Different Types Of Spaces
It may contain extra spaces before text strings in cells;

Remove Spaces in Excel - Leading, Trailing and Double Remove Extra Spaces in Excel (Leading, Trailing, Double Spaces)
Remove Extra Spaces in Excel (Leading, Trailing, Double Spaces)
FREE EXCEL TIPS EBOOK - Click here to get your copy
Watch Video – Remove Spaces in Excel
This Tutorial Covers:
How to Remove Spaces in Excel
Using the TRIM Function
Remove Extra Spaces in Excel using FIND and REPLACE
Removing Double Spaces
Removing Single Spaces
Remove Line Breaks
You may also like the following Excel tutorials:
FREE EXCEL BOOK
Get 51 Excel Tips Ebook to skyrocket your productivity and get work done faster
 How to Remove Spaces in Excel
Using the TRIM Function
Remove Extra Spaces in Excel using FIND and REPLACE
Removing Double Spaces
Removing Single Spaces
Remove Line Breaks
How to Remove Spaces in Excel
In this tutorial, I will show you two ways to remove spaces in Excel. Using TRIM function. Using Find and Replace. Using the TRIM Function
Excel TRIM function removes the leading and trailing spaces, and double spaces between text strings. For example, in the above example, to remove spaces from the entire list if first names (in A2: A7), use the following formula in cell C1 and drag it down for all the first names: =TRIM (A2)
Excel TRIM function would instantly remove all the leading and trailing spaces in the cell. Once you have the cleaned data, copy it paste it as values in place of the original data. This function is also helpful if you have more than one space character between words. It would remove the extra spaces such that the result always have one space character between words.

How to Remove Spaces in Excel
Using the TRIM Function
Remove Extra Spaces in Excel using FIND and REPLACE
Removing Double Spaces
Removing Single Spaces
Remove Line Breaks
How to Remove Spaces in Excel
In this tutorial, I will show you two ways to remove spaces in Excel. Using TRIM function. Using Find and Replace. Using the TRIM Function
Excel TRIM function removes the leading and trailing spaces, and double spaces between text strings. For example, in the above example, to remove spaces from the entire list if first names (in A2: A7), use the following formula in cell C1 and drag it down for all the first names: =TRIM (A2)
Excel TRIM function would instantly remove all the leading and trailing spaces in the cell. Once you have the cleaned data, copy it paste it as values in place of the original data. This function is also helpful if you have more than one space character between words. It would remove the extra spaces such that the result always have one space character between words.

Removing Spaces in Excel 2010 Made Easy
 2. Type =TRIM (Cell Reference) and press Enter. The result is that text will now remove all leading and trailing spaces, as well as extra spaces in the middle of a string. There may be times when the TRIM function does not work. For instance, when data is copied from a HTM page, the spaces in the cells are nonbreaking spaces with a decimal character code of 160 rather than a ASCII space decimal character code of 32. In such cases, you will have to use the formula
=TRIM (SUBSTITUTE (Cell Reference,CHAR (160),CHAR (32)))
Remove Spaces In Excel Between Words Using Find and Replace Functionality
If you need to remove extra spaces between words you can make use of the Find and Replace functionality. This will also remove leading and trailing spaces by one space but won’t completely remove them. 1. Select the range of cells where you want to remove the extra spaces. 2.

Removing Spaces in Excel 2010 Made Easy

2. Type =TRIM (Cell Reference) and press Enter. The result is that text will now remove all leading and trailing spaces, as well as extra spaces in the middle of a string. There may be times when the TRIM function does not work. For instance, when data is copied from a HTM page, the spaces in the cells are nonbreaking spaces with a decimal character code of 160 rather than a ASCII space decimal character code of 32. In such cases, you will have to use the formula
=TRIM (SUBSTITUTE (Cell Reference,CHAR (160),CHAR (32)))
Remove Spaces In Excel Between Words Using Find and Replace Functionality
If you need to remove extra spaces between words you can make use of the Find and Replace functionality. This will also remove leading and trailing spaces by one space but won’t completely remove them. 1. Select the range of cells where you want to remove the extra spaces. 2.

Learn How to Remove Extra Spaces From Excel Using TRIM How to Remove Extra Spaces From Excel
How to Remove Extra Spaces From Excel
An easier way to clean up your Excel spreadsheet
How the TRIM Function Works
Using the TRIM Function
Removing Extra Spaces From an Entire Column
Using the Search and Replace Short Cut Key
Was this page helpful?
 Double-click the right mouse button to auto-fill the entire column
Now you'll have column A with the extra spaces, and column B with the same text cleaned up. Perform the same copy and paste (values only) procedure in the previous step, but copy and paste the entire columns rather than just individual cells. Finally, right click at the top of column B to highlight the entire column, and delete it, shifting all other cells on the spreadsheet to the left. Using the Search and Replace Short Cut Key
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. Select the entire column you want to clean. Press the CTRL + H shortcut to open Excel's Search and Replace window. In the Find what field, type two spaces. In the Replace with field, type one space. Keep pressing the Replace All button until all extra spaces are gone. The benefit of using this approach is that you don't have to go through the entire copy-and-paste procedure that you need to with the TRIM function.

Learn How to Remove Extra Spaces From Excel Using TRIM

How to Remove Extra Spaces From Excel
How to Remove Extra Spaces From Excel
An easier way to clean up your Excel spreadsheet
How the TRIM Function Works
Using the TRIM Function
Removing Extra Spaces From an Entire Column
Using the Search and Replace Short Cut Key
Was this page helpful?

Double-click the right mouse button to auto-fill the entire column
Now you'll have column A with the extra spaces, and column B with the same text cleaned up. Perform the same copy and paste (values only) procedure in the previous step, but copy and paste the entire columns rather than just individual cells. Finally, right click at the top of column B to highlight the entire column, and delete it, shifting all other cells on the spreadsheet to the left. Using the Search and Replace Short Cut Key
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. Select the entire column you want to clean. Press the CTRL + H shortcut to open Excel's Search and Replace window. In the Find what field, type two spaces. In the Replace with field, type one space. Keep pressing the Replace All button until all extra spaces are gone. The benefit of using this approach is that you don't have to go through the entire copy-and-paste procedure that you need to with the TRIM function.

4 Ways to Remove Unwanted Space Characters | How To Excel 4 Ways to Remove Unwanted Space Characters
4 Ways to Remove Unwanted Space Characters
Table of Contents
Our Example Data for the Post
Removing Extra Spaces with the TRIM Function
Removing Extra Spaces Between Words with Find and Replace
Removing Extra Spaces with Power Query
Removing Extra Spaces Between Words With VBA
Conclusions
Subscribe
Consulting
Excel Insights
Excel Functions eBook
Microsoft MVP
Categories
Advertisement
 Our data didn’t have any column headings, so we’ll leave the My table has headers box unchecked. Press the OK button to create the table and the power query editor will open up. Right click on the column heading ➜ choose Transform ➜ select Trim. Unfortunately, this doesn’t remove any extra spaces between the words and we need to implement a couple Replace Values transformation steps to accomplish this. Right click on the column and select Replace Values from the menu. Like the find and replace method, we will need to add two spaces as the Value To Find and a single space as the Replace With value. We can then press the OK button to add this transformation. We need to repeat this step until all the extra spaces have been removed from our data. To get the cleaned data back into Excel, we need to close and load the data. We can go to the Home tab in the power query editor ➜ press Close & Load ➜ choose Close & Load To ➜ choose a Table and select the location to load the table.

Our data didn’t have any column headings, so we’ll leave the My table has headers box unchecked. Press the OK button to create the table and the power query editor will open up. Right click on the column heading ➜ choose Transform ➜ select Trim. Unfortunately, this doesn’t remove any extra spaces between the words and we need to implement a couple Replace Values transformation steps to accomplish this. Right click on the column and select Replace Values from the menu. Like the find and replace method, we will need to add two spaces as the Value To Find and a single space as the Replace With value. We can then press the OK button to add this transformation. We need to repeat this step until all the extra spaces have been removed from our data. To get the cleaned data back into Excel, we need to close and load the data. We can go to the Home tab in the power query editor ➜ press Close & Load ➜ choose Close & Load To ➜ choose a Table and select the location to load the table.

Remove Trailing Spaces from Cells in Excel - Free Excel Tutorial Remove Trailing Spaces from Cells in Excel
Remove Trailing Spaces from Cells in Excel
Remove Trailing Spaces from Cells with Formula
Remove Trailing Spaces from Cells with VBA Macro
Related Functions
 B4 contain text string values, and you want to strip all leading and trailing spaces in the given range of cells, how to achieve it. You can use the following formula. = TRIM (B1)
Type this formula into a blank cell and then press Enter key, and drag the AutoFill Handle over other cells to apply this formula. This formula will remove both leading and trailing spaces from text string in cells. Remove Trailing Spaces from Cells with VBA Macro
You can also use an Excel VBA Macro to remote all trailing spaces from a given range of cells. Just do the following steps: #1 select one range of cells that you want to remove trailing spaces
#2 open your excel workbook and then click on “ Visual Basic ” command under DEVELOPER Tab, or just press “ ALT+F11 ” shortcut. #3 then the “ Visual Basic Editor ” window will appear. #4 click “ Insert ” ->” Module ” to create a new module. #5 paste the below VBA code into the code window.

Remove Trailing Spaces from Cells in Excel - Free Excel Tutorial

Remove Trailing Spaces from Cells in Excel
Remove Trailing Spaces from Cells in Excel
Remove Trailing Spaces from Cells with Formula
Remove Trailing Spaces from Cells with VBA Macro
Related Functions

B4 contain text string values, and you want to strip all leading and trailing spaces in the given range of cells, how to achieve it. You can use the following formula. = TRIM (B1)
Type this formula into a blank cell and then press Enter key, and drag the AutoFill Handle over other cells to apply this formula. This formula will remove both leading and trailing spaces from text string in cells. Remove Trailing Spaces from Cells with VBA Macro
You can also use an Excel VBA Macro to remote all trailing spaces from a given range of cells. Just do the following steps: #1 select one range of cells that you want to remove trailing spaces
#2 open your excel workbook and then click on “ Visual Basic ” command under DEVELOPER Tab, or just press “ ALT+F11 ” shortcut. #3 then the “ Visual Basic Editor ” window will appear. #4 click “ Insert ” ->” Module ” to create a new module. #5 paste the below VBA code into the code window.

4 Ways to Remove Unwanted Space Characters | How To Excel 4 Ways to Remove Unwanted Space Characters
4 Ways to Remove Unwanted Space Characters
Table of Contents
Our Example Data for the Post
Removing Extra Spaces with the TRIM Function
Removing Extra Spaces Between Words with Find and Replace
Removing Extra Spaces with Power Query
Removing Extra Spaces Between Words With VBA
Conclusions
Subscribe
Consulting
Excel Insights
Excel Functions eBook
Microsoft MVP
Categories
Advertisement
 It removes all spaces from a text string except for single spaces between words. The TRIM function has one required input, and this is the text from which we want to trim off excess spaces. The input can either be a cell reference like B2 or a hardcoded string like ” Hello World! “. TRIM (B2) would return the contents of cell B2 with extra spaces removed. TRIM (" Hello World! ") would return “ Hello World! “. Removing Extra Spaces Between Words with Find and Replace
The next method will use Excel’s find and replace search feature. This will only work for removing extra spaces between words. First, we need to select the rage of cells to which we want to remove extra space. Then go to the Home tab ➜ Editing section ➜ press the Find & Select button ➜ choose the Replace option from the menu.

It removes all spaces from a text string except for single spaces between words. The TRIM function has one required input, and this is the text from which we want to trim off excess spaces. The input can either be a cell reference like B2 or a hardcoded string like ” Hello World! “. TRIM (B2) would return the contents of cell B2 with extra spaces removed. TRIM (" Hello World! ") would return “ Hello World! “. Removing Extra Spaces Between Words with Find and Replace
The next method will use Excel’s find and replace search feature. This will only work for removing extra spaces between words. First, we need to select the rage of cells to which we want to remove extra space. Then go to the Home tab ➜ Editing section ➜ press the Find & Select button ➜ choose the Replace option from the menu.

Remove Spaces in Excel - Leading, Trailing and Double Remove Extra Spaces in Excel (Leading, Trailing, Double Spaces)
Remove Extra Spaces in Excel (Leading, Trailing, Double Spaces)
FREE EXCEL TIPS EBOOK - Click here to get your copy
Watch Video – Remove Spaces in Excel
This Tutorial Covers:
How to Remove Spaces in Excel
Using the TRIM Function
Remove Extra Spaces in Excel using FIND and REPLACE
Removing Double Spaces
Removing Single Spaces
Remove Line Breaks
You may also like the following Excel tutorials:
FREE EXCEL BOOK
Get 51 Excel Tips Ebook to skyrocket your productivity and get work done faster
 Excel TRIM function does a good job in removing spaces in Excel, however, it fails when you have non-printing characters (such as line breaks) in your data set. To remove non-printing characters, you can use a combination of TRIM and CLEAN functions. If you have some text in cell A1 from which you want to remove spaces, use the below formula: =TRIM (CLEAN (A1))
Non-printing characters can also result from =CHAR (160), which can not be removed by the CLEAN formula. So, if you want to be absolutely sure that you have all the extra spaces and non-printing characters, use the below formula: =TRIM (CLEAN ( SUBSTITUTE (A1,CHAR (160)," ")))
Remove Extra Spaces in Excel using FIND and REPLACE
You can remove spaces in Excel using the Find and Replace functionality. This is a faster technique and can be useful in the given situations: When you want to remove double spaces. When you want to remove all the space characters. Removing Double Spaces
Note that this technique cannot be used to remove leading or trailing spaces.

Excel TRIM function does a good job in removing spaces in Excel, however, it fails when you have non-printing characters (such as line breaks) in your data set. To remove non-printing characters, you can use a combination of TRIM and CLEAN functions. If you have some text in cell A1 from which you want to remove spaces, use the below formula: =TRIM (CLEAN (A1))
Non-printing characters can also result from =CHAR (160), which can not be removed by the CLEAN formula. So, if you want to be absolutely sure that you have all the extra spaces and non-printing characters, use the below formula: =TRIM (CLEAN ( SUBSTITUTE (A1,CHAR (160)," ")))
Remove Extra Spaces in Excel using FIND and REPLACE
You can remove spaces in Excel using the Find and Replace functionality. This is a faster technique and can be useful in the given situations: When you want to remove double spaces. When you want to remove all the space characters. Removing Double Spaces
Note that this technique cannot be used to remove leading or trailing spaces.

Remove Trailing Spaces from Cells in Excel - Free Excel Tutorial Remove Trailing Spaces from Cells in Excel
Remove Trailing Spaces from Cells in Excel
Remove Trailing Spaces from Cells with Formula
Remove Trailing Spaces from Cells with VBA Macro
Related Functions
 Then clicking “ Save ” button. Sub RemovTrailSpaces ()  Dim cel As Range  For Each cel In Selection. Cells  cel = Trim (cel)  Next End Sub
#6 back to the current worksheet, then run the above excel macro. Click Run button. #7 Let’s see the result. Related Functions
Excel TRIM function
The Excel TRIM function removes all spaces from text string except for single spaces between words. You can use the TRIM function to remove extra spaces between words in a string. The syntax of the TRIM function is as below:= TRIM (text)….

Then clicking “ Save ” button. Sub RemovTrailSpaces ()  Dim cel As Range  For Each cel In Selection. Cells  cel = Trim (cel)  Next End Sub
#6 back to the current worksheet, then run the above excel macro. Click Run button. #7 Let’s see the result. Related Functions
Excel TRIM function
The Excel TRIM function removes all spaces from text string except for single spaces between words. You can use the TRIM function to remove extra spaces between words in a string. The syntax of the TRIM function is as below:= TRIM (text)….

4 Ways to Remove Unwanted Space Characters | How To Excel 4 Ways to Remove Unwanted Space Characters
4 Ways to Remove Unwanted Space Characters
Table of Contents
Our Example Data for the Post
Removing Extra Spaces with the TRIM Function
Removing Extra Spaces Between Words with Find and Replace
Removing Extra Spaces with Power Query
Removing Extra Spaces Between Words With VBA
Conclusions
Subscribe
Consulting
Excel Insights
Excel Functions eBook
Microsoft MVP
Categories
Advertisement
 This will leave a single space at the start or end of the data if there were any spaces there. Removing Extra Spaces with Power Query
Power Query is all about data transformation, so it should be able to handle this task. Select the data and go to the Data tab ➜ press the From Table/Range command. This will turn our data into an Excel Table, if it’s not already formatted as one. We can make sure the data range selected is correct and adjust it if needed. Our data didn’t have any column headings, so we’ll leave the My table has headers box unchecked. Press the OK button to create the table and the power query editor will open up. Right click on the column heading ➜ choose Transform ➜ select Trim. Unfortunately, this doesn’t remove any extra spaces between the words and we need to implement a couple Replace Values transformation steps to accomplish this. Right click on the column and select Replace Values from the menu.

This will leave a single space at the start or end of the data if there were any spaces there. Removing Extra Spaces with Power Query
Power Query is all about data transformation, so it should be able to handle this task. Select the data and go to the Data tab ➜ press the From Table/Range command. This will turn our data into an Excel Table, if it’s not already formatted as one. We can make sure the data range selected is correct and adjust it if needed. Our data didn’t have any column headings, so we’ll leave the My table has headers box unchecked. Press the OK button to create the table and the power query editor will open up. Right click on the column heading ➜ choose Transform ➜ select Trim. Unfortunately, this doesn’t remove any extra spaces between the words and we need to implement a couple Replace Values transformation steps to accomplish this. Right click on the column and select Replace Values from the menu.

Remove Space in Excel | Top 5 Methods to Filter Data with Spaces Remove Space in Excel
Remove Space in Excel
Top 5 Methods to Filter Data with Spaces in Excel
#1 – How to Remove Space from the text in Excel Using Trim Function?
#2 – How to Remove Space Using Delimited in Text To Columns?
#3 – How to Remove Space in Excel Using Fixed Width in Text to Columns Option?
#4 – How to Remove Space Using Find & Replace Option?
#5 – How to Remove Space in Excel Using Substitute Function?
Explanation of Removing Spaces in Excel
Things to Remember
Recommended Articles
 Click Enter, and excel automatically remove the extra spaces. Drag and Copy the formula to cell B5. Trim Function removed the extra spaces except for the space between the texts itself. #2 – How to Remove Space Using Delimited in Text To Columns? Text to columns in excel also can remove spaces from a cell. Consider the following data,
Where trim function did not remove the spaces between the texts but with text to columns, we can remove the extra spaces between the texts and numbers in excel also. Select Column A then, go to Data Tab, click on Text to Columns. Select Delimited. Click on Next Space as a delimiter, then Click on Finish. Excel separated the texts from their spaces and placed them into the next column.

Click Enter, and excel automatically remove the extra spaces. Drag and Copy the formula to cell B5. Trim Function removed the extra spaces except for the space between the texts itself. #2 – How to Remove Space Using Delimited in Text To Columns? Text to columns in excel also can remove spaces from a cell. Consider the following data,
Where trim function did not remove the spaces between the texts but with text to columns, we can remove the extra spaces between the texts and numbers in excel also. Select Column A then, go to Data Tab, click on Text to Columns. Select Delimited. Click on Next Space as a delimiter, then Click on Finish. Excel separated the texts from their spaces and placed them into the next column.

Learn How to Remove Extra Spaces From Excel Using TRIM How to Remove Extra Spaces From Excel
How to Remove Extra Spaces From Excel
An easier way to clean up your Excel spreadsheet
How the TRIM Function Works
Using the TRIM Function
Removing Extra Spaces From an Entire Column
Using the Search and Replace Short Cut Key
Was this page helpful?
 Select Paste Special. Select Values and then click OK. Delete the text from A6. Now only the clean text, without spaces, exists on the sheet. If you're using Excel Online, disregard steps 4 and 5 above. Instead, click the down arrow under Paste on the Home ribbon, then select Paste Values. Removing Extra Spaces From an Entire Column
The method above works well if you're only cleaning spaces from one cell, but what if you want to remove spaces from an entire column? The procedure for dealing with a column isn't that different from dealing with one cell. In this example, the column with too many spaces starts with A2. Create a new empty column beside the column you want to remove spaces from (in this example this new column starts with B2).

Select Paste Special. Select Values and then click OK. Delete the text from A6. Now only the clean text, without spaces, exists on the sheet. If you're using Excel Online, disregard steps 4 and 5 above. Instead, click the down arrow under Paste on the Home ribbon, then select Paste Values. Removing Extra Spaces From an Entire Column
The method above works well if you're only cleaning spaces from one cell, but what if you want to remove spaces from an entire column? The procedure for dealing with a column isn't that different from dealing with one cell. In this example, the column with too many spaces starts with A2. Create a new empty column beside the column you want to remove spaces from (in this example this new column starts with B2).

Remove Extra Spaces from Excel Data | Pryor Learning Solutions Remove Extra Spaces from Excel Data
Remove Extra Spaces from Excel Data
Use the Trim Function
Use a Formula to Remove All Spaces
Bonus Hint!
Tepring Crocker
 Click CTRL+F to open the Find dialog box, then click the Replace tab. Enter one space ” ” in the Find what: field and leave the Replace with: field empty to remove all spaces. Warning: This technique will search for and replace ALL spaces in the entire sheet or selection area. Use carefully so that you don’t remove spaces you still want or need! With these tips, you can clean up data entered from multiple sources and ensure that it is consistent and less prone to unintended duplication. Use these tips to remove spaces when you want to: Find unintended duplicates in your data
Prepare someone else’s data before you import it into your own spreadsheets
Prepare your data for export into a database
When do you find the need to find and remove unwanted spaces?

Remove Extra Spaces from Excel Data | Pryor Learning Solutions

Remove Extra Spaces from Excel Data
Remove Extra Spaces from Excel Data
Use the Trim Function
Use a Formula to Remove All Spaces
Bonus Hint!
Tepring Crocker

Click CTRL+F to open the Find dialog box, then click the Replace tab. Enter one space ” ” in the Find what: field and leave the Replace with: field empty to remove all spaces. Warning: This technique will search for and replace ALL spaces in the entire sheet or selection area. Use carefully so that you don’t remove spaces you still want or need! With these tips, you can clean up data entered from multiple sources and ensure that it is consistent and less prone to unintended duplication. Use these tips to remove spaces when you want to: Find unintended duplicates in your data
Prepare someone else’s data before you import it into your own spreadsheets
Prepare your data for export into a database
When do you find the need to find and remove unwanted spaces?

Remove Leading Spaces in Excel | Top 4 Methods to Remove Cell Spaces Remove Leading Spaces in Excel
Remove Leading Spaces in Excel
How to Remove Leading Spaces in Excel Cell?
#1 – Remove Unwanted Leading Spaces in Excel Cell Using TRIM Function
#2 – Remove Non-Breaking Leading Spaces in Excel Cell
#3 – Remove Double Spaces Using Excel FIND & REPLACE Method
#4 – Remove All Leading Spaces Using Excel FIND & REPLACE Method
Things to Remember
Recommended Articles
 The syntax is very simple. We just need to select the required cell to be trimmed. The Trim function removes all the spaces except the single space after each word. Let’s apply the Trim formula in excel to remove all kinds of spaces in a cell. This trim function removed the spaces between “Capital” and “is.” #2 – Remove Non-Breaking Leading Spaces in Excel Cell
It is very easy to remove normal leading spaces in the excel cell. In the case of non-breaking leading spaces, the Trim function goes wrong. Look at the below image. Even after the Trim is applied, we don’t see the perfect sentence here. This is the problem with non-breaking leading spaces in an excel cell.

The syntax is very simple. We just need to select the required cell to be trimmed. The Trim function removes all the spaces except the single space after each word. Let’s apply the Trim formula in excel to remove all kinds of spaces in a cell. This trim function removed the spaces between “Capital” and “is.” #2 – Remove Non-Breaking Leading Spaces in Excel Cell
It is very easy to remove normal leading spaces in the excel cell. In the case of non-breaking leading spaces, the Trim function goes wrong. Look at the below image. Even after the Trim is applied, we don’t see the perfect sentence here. This is the problem with non-breaking leading spaces in an excel cell.

Remove Spaces in Excel (Examples) | How To Remove Spaces? Excel Remove Spaces
Excel Remove Spaces
Excel Remove Spaces (Table of Contents)
Introduction to Remove Spaces in Excel
Different Types Of Spaces
TRIM Function
How to Remove Extra Spaces in Excel?
Example #1 – Remove Excel Spaces with the help of Find and Replace
Example #2 – Remove Excel Spaces with the help of TRIM Function
Example #3 – Remove Excel Spaces with the help of SUBSTITUTE Function
Things to Remember about Excel Remove Spaces
Recommended Articles
 You can find a difference in character count between both datasets. Where Find and Replace remove all the blank spaces. In extra in-between spaces content also, it has removed all the blank spaces without retaining a single space between words (This can be rectified with the help of TRIM function). Note: This method is only used when you want to remove a leading & trailing type of extra spaces from selected cells or to remove all the spaces in the data range from excel completely. Example #2 – Remove Excel Spaces with the help of TRIM Function
In the below-mentioned example, I have a dataset in column D that contains all three types of extra spaces, i.e. leading spaces, trailing spaces & extra in-between spaces. For reference, I have done a number of character count for the column D datasets. With the help of the LEN function in column E., I have taken this raw data to another new column (column G) to apply the TRIM Function . The Excel TRIM function removes all spaces from text except a single space between words. Now, In cell H4, let’s apply a TRIM function.

You can find a difference in character count between both datasets. Where Find and Replace remove all the blank spaces. In extra in-between spaces content also, it has removed all the blank spaces without retaining a single space between words (This can be rectified with the help of TRIM function). Note: This method is only used when you want to remove a leading & trailing type of extra spaces from selected cells or to remove all the spaces in the data range from excel completely. Example #2 – Remove Excel Spaces with the help of TRIM Function
In the below-mentioned example, I have a dataset in column D that contains all three types of extra spaces, i.e. leading spaces, trailing spaces & extra in-between spaces. For reference, I have done a number of character count for the column D datasets. With the help of the LEN function in column E., I have taken this raw data to another new column (column G) to apply the TRIM Function . The Excel TRIM function removes all spaces from text except a single space between words. Now, In cell H4, let’s apply a TRIM function.

Remove Spaces in Excel (Examples) | How To Remove Spaces? Excel Remove Spaces
Excel Remove Spaces
Excel Remove Spaces (Table of Contents)
Introduction to Remove Spaces in Excel
Different Types Of Spaces
TRIM Function
How to Remove Extra Spaces in Excel?
Example #1 – Remove Excel Spaces with the help of Find and Replace
Example #2 – Remove Excel Spaces with the help of TRIM Function
Example #3 – Remove Excel Spaces with the help of SUBSTITUTE Function
Things to Remember about Excel Remove Spaces
Recommended Articles
 Now, to activate the find and replace option, press the shortcut key Ctrl + H, find and replace window appears. In Find what: input bar, insert a blank space with the help of the space bar once, and in Replace with no need to input anything, it should remain blank. Click on the Replace All button. It replaces all the blank spaces in the cell. You can find a difference in character count between both datasets. Where Find and Replace remove all the blank spaces. In extra in-between spaces content also, it has removed all the blank spaces without retaining a single space between words (This can be rectified with the help of TRIM function). Note: This method is only used when you want to remove a leading & trailing type of extra spaces from selected cells or to remove all the spaces in the data range from excel completely.

Now, to activate the find and replace option, press the shortcut key Ctrl + H, find and replace window appears. In Find what: input bar, insert a blank space with the help of the space bar once, and in Replace with no need to input anything, it should remain blank. Click on the Replace All button. It replaces all the blank spaces in the cell. You can find a difference in character count between both datasets. Where Find and Replace remove all the blank spaces. In extra in-between spaces content also, it has removed all the blank spaces without retaining a single space between words (This can be rectified with the help of TRIM function). Note: This method is only used when you want to remove a leading & trailing type of extra spaces from selected cells or to remove all the spaces in the data range from excel completely.

Remove Spaces in Excel (Examples) | How To Remove Spaces? Excel Remove Spaces
Excel Remove Spaces
Excel Remove Spaces (Table of Contents)
Introduction to Remove Spaces in Excel
Different Types Of Spaces
TRIM Function
How to Remove Extra Spaces in Excel?
Example #1 – Remove Excel Spaces with the help of Find and Replace
Example #2 – Remove Excel Spaces with the help of TRIM Function
Example #3 – Remove Excel Spaces with the help of SUBSTITUTE Function
Things to Remember about Excel Remove Spaces
Recommended Articles
 This removes the spaces anywhere from the selected cells. In another way, we can remove the spaces by using a TRIM function. This removes the spaces which are there at the start and end of the selected cell content. And we can also use the SUBSTITUTE function, where we can substitute space with blank to remove spaces completely. Start Your Free Excel Course
Excel functions, formula, charts, formatting creating excel dashboard & others
Different Types Of Spaces
It may contain extra spaces before text strings in cells; these spaces are called Leading spaces. It may contain extra spaces after text strings in cells; these spaces are called Trailing spaces. Datasets may contain extra in-between spaces, i.e.additional spaces in between text. Datasets may also contain Line breaks with extra space.

This removes the spaces anywhere from the selected cells. In another way, we can remove the spaces by using a TRIM function. This removes the spaces which are there at the start and end of the selected cell content. And we can also use the SUBSTITUTE function, where we can substitute space with blank to remove spaces completely. Start Your Free Excel Course
Excel functions, formula, charts, formatting creating excel dashboard & others
Different Types Of Spaces
It may contain extra spaces before text strings in cells; these spaces are called Leading spaces. It may contain extra spaces after text strings in cells; these spaces are called Trailing spaces. Datasets may contain extra in-between spaces, i.e.additional spaces in between text. Datasets may also contain Line breaks with extra space.

Remove Spaces in Excel - Leading, Trailing and Double Remove Extra Spaces in Excel (Leading, Trailing, Double Spaces)
Remove Extra Spaces in Excel (Leading, Trailing, Double Spaces)
FREE EXCEL TIPS EBOOK - Click here to get your copy
Watch Video – Remove Spaces in Excel
This Tutorial Covers:
How to Remove Spaces in Excel
Using the TRIM Function
Remove Extra Spaces in Excel using FIND and REPLACE
Removing Double Spaces
Removing Single Spaces
Remove Line Breaks
You may also like the following Excel tutorials:
FREE EXCEL BOOK
Get 51 Excel Tips Ebook to skyrocket your productivity and get work done faster
 Removing Single Spaces
To remove all the space characters in a data set, follow the below steps: Select the cells from which you want to remove the space character. Go to Home –> Find & Select –> Replace. ( You can also use the keyboard shortcut – Control + H). In the Find and Replace dialogue box, enter: Find what: Single Space. Replace with: Leave this blank. Click on Replace All.

Removing Single Spaces
To remove all the space characters in a data set, follow the below steps: Select the cells from which you want to remove the space character. Go to Home –> Find & Select –> Replace. ( You can also use the keyboard shortcut – Control + H). In the Find and Replace dialogue box, enter: Find what: Single Space. Replace with: Leave this blank. Click on Replace All.

Remove Space in Excel | Top 5 Methods to Filter Data with Spaces Remove Space in Excel
Remove Space in Excel
Top 5 Methods to Filter Data with Spaces in Excel
#1 – How to Remove Space from the text in Excel Using Trim Function?
#2 – How to Remove Space Using Delimited in Text To Columns?
#3 – How to Remove Space in Excel Using Fixed Width in Text to Columns Option?
#4 – How to Remove Space Using Find & Replace Option?
#5 – How to Remove Space in Excel Using Substitute Function?
Explanation of Removing Spaces in Excel
Things to Remember
Recommended Articles
 Consider the following data,
Where trim function did not remove the spaces between the texts but with text to columns, we can remove the extra spaces between the texts and numbers in excel also. Select Column A then, go to Data Tab, click on Text to Columns. Select Delimited. Click on Next Space as a delimiter, then Click on Finish. Excel separated the texts from their spaces and placed them into the next column. #3 – How to Remove Space in Excel Using Fixed Width in Text to Columns Option? We can also use fixed width in a text to columns option to remove extra spaces from text and numbers in excel. However, our data needs to be in an exact number of characters before the space so that only spaces can be removed. Consider the following data. We have some random text with random numbers with spaces separating them.

Consider the following data,
Where trim function did not remove the spaces between the texts but with text to columns, we can remove the extra spaces between the texts and numbers in excel also. Select Column A then, go to Data Tab, click on Text to Columns. Select Delimited. Click on Next Space as a delimiter, then Click on Finish. Excel separated the texts from their spaces and placed them into the next column. #3 – How to Remove Space in Excel Using Fixed Width in Text to Columns Option? We can also use fixed width in a text to columns option to remove extra spaces from text and numbers in excel. However, our data needs to be in an exact number of characters before the space so that only spaces can be removed. Consider the following data. We have some random text with random numbers with spaces separating them.

10 Super Neat Ways to Clean Data in Excel Spreadsheets 10 Super Neat Ways to Clean Data in Excel Spreadsheets
10 Super Neat Ways to Clean Data in Excel Spreadsheets
FREE EXCEL TIPS EBOOK - Click here to get your copy
Watch Video – 10 Ways to Clean Data in Excel
In this blog post, I will show you 10 simple ways to clean data in Excel.
This Tutorial Covers:
#1 Get Rid of Extra Spaces
Syntax: TRIM (text)
#2 Select and Treat All Blank Cells
#3 Convert Numbers Stored as Text into Numbers
#4 – Remove Duplicates
#5 Highlight Errors
Using Conditional Formatting
Using Go To Special
#6 Change Text to Lower/Upper/Proper Case
#7 Parse Data Using Text to Column
#8 Spell Check
#9 Delete all Formatting
#10 Use Find and Replace to Clean Data in Excel
You May Also Like the Following Excel Tutorials:
FREE EXCEL BOOK
Get 51 Excel Tips Ebook to skyrocket your productivity and get work done faster
 While you may somehow spot the extra spaces between words or numbers, trailing spaces are not even visible. Here is a neat way to get rid of these extra spaces – Use TRIM Function. Syntax: TRIM (text)
Excel TRIM function takes the cell reference (or text) as the input. It removes leading and trailing spaces as well as the additional spaces between words (except single spaces). #2 Select and Treat All Blank Cells
Blank cells can create havoc if not treated beforehand. I often face issues with blank cells in a data set that is used to create reports/dashboards. You may want to fill all blank cells with ‘0’ or ‘Not Available’, or may simply want to highlight it. If there is a huge data set, doing this manually could take hours. Thankfully, there is a way you can select all the blank cells at once.

10 Super Neat Ways to Clean Data in Excel Spreadsheets

10 Super Neat Ways to Clean Data in Excel Spreadsheets
10 Super Neat Ways to Clean Data in Excel Spreadsheets
FREE EXCEL TIPS EBOOK - Click here to get your copy
Watch Video – 10 Ways to Clean Data in Excel
In this blog post, I will show you 10 simple ways to clean data in Excel.
This Tutorial Covers:
#1 Get Rid of Extra Spaces
Syntax: TRIM (text)
#2 Select and Treat All Blank Cells
#3 Convert Numbers Stored as Text into Numbers
#4 – Remove Duplicates
#5 Highlight Errors
Using Conditional Formatting
Using Go To Special
#6 Change Text to Lower/Upper/Proper Case
#7 Parse Data Using Text to Column
#8 Spell Check
#9 Delete all Formatting
#10 Use Find and Replace to Clean Data in Excel
You May Also Like the Following Excel Tutorials:
FREE EXCEL BOOK
Get 51 Excel Tips Ebook to skyrocket your productivity and get work done faster

While you may somehow spot the extra spaces between words or numbers, trailing spaces are not even visible. Here is a neat way to get rid of these extra spaces – Use TRIM Function. Syntax: TRIM (text)
Excel TRIM function takes the cell reference (or text) as the input. It removes leading and trailing spaces as well as the additional spaces between words (except single spaces). #2 Select and Treat All Blank Cells
Blank cells can create havoc if not treated beforehand. I often face issues with blank cells in a data set that is used to create reports/dashboards. You may want to fill all blank cells with ‘0’ or ‘Not Available’, or may simply want to highlight it. If there is a huge data set, doing this manually could take hours. Thankfully, there is a way you can select all the blank cells at once.

Remove Spaces in Excel (Examples) | How To Remove Spaces? Excel Remove Spaces
Excel Remove Spaces
Excel Remove Spaces (Table of Contents)
Introduction to Remove Spaces in Excel
Different Types Of Spaces
TRIM Function
How to Remove Extra Spaces in Excel?
Example #1 – Remove Excel Spaces with the help of Find and Replace
Example #2 – Remove Excel Spaces with the help of TRIM Function
Example #3 – Remove Excel Spaces with the help of SUBSTITUTE Function
Things to Remember about Excel Remove Spaces
Recommended Articles
 these spaces are called Leading spaces. It may contain extra spaces after text strings in cells; these spaces are called Trailing spaces. Datasets may contain extra in-between spaces, i.e.additional spaces in between text. Datasets may also contain Line breaks with extra space. We can get rid of these types of spaces quickly & easily with the below-mentioned options: FIND AND REPLACE
TRIM Function
SUBSTITUTE Function
CLEAN and TRIM function to Remove Extra Space of Line Break in excel
TRIM Function
TRIM function is a prebuilt integrated function categorized under Text functions. It Removes all extra spaces from text except a single space between words in excel. The syntax or formula for the TRIM function in Excel is: Trim function in Excel has only one compulsory argument or parameter, i.e. text.

these spaces are called Leading spaces. It may contain extra spaces after text strings in cells; these spaces are called Trailing spaces. Datasets may contain extra in-between spaces, i.e.additional spaces in between text. Datasets may also contain Line breaks with extra space. We can get rid of these types of spaces quickly & easily with the below-mentioned options: FIND AND REPLACE
TRIM Function
SUBSTITUTE Function
CLEAN and TRIM function to Remove Extra Space of Line Break in excel
TRIM Function
TRIM function is a prebuilt integrated function categorized under Text functions. It Removes all extra spaces from text except a single space between words in excel. The syntax or formula for the TRIM function in Excel is: Trim function in Excel has only one compulsory argument or parameter, i.e. text.

Remove Spaces in Excel - Leading, Trailing and Double Remove Extra Spaces in Excel (Leading, Trailing, Double Spaces)
Remove Extra Spaces in Excel (Leading, Trailing, Double Spaces)
FREE EXCEL TIPS EBOOK - Click here to get your copy
Watch Video – Remove Spaces in Excel
This Tutorial Covers:
How to Remove Spaces in Excel
Using the TRIM Function
Remove Extra Spaces in Excel using FIND and REPLACE
Removing Double Spaces
Removing Single Spaces
Remove Line Breaks
You may also like the following Excel tutorials:
FREE EXCEL BOOK
Get 51 Excel Tips Ebook to skyrocket your productivity and get work done faster
 Go to Home –> Find and Select –> Replace (Keyboard Shortcut – Control + H ). In the Find and Replace Dialogue Box: Find What: Press Control + J (you may not see anything except for a blinking dot). Replace With: Leave it empty. Replace All. This will instantly remove all the line breaks from the data set that you selected. Based on your situation, you can choose either method (formula or find and replace) to remove spaces in Excel. You may also like the following Excel tutorials:

Go to Home –> Find and Select –> Replace (Keyboard Shortcut – Control + H ). In the Find and Replace Dialogue Box: Find What: Press Control + J (you may not see anything except for a blinking dot). Replace With: Leave it empty. Replace All. This will instantly remove all the line breaks from the data set that you selected. Based on your situation, you can choose either method (formula or find and replace) to remove spaces in Excel. You may also like the following Excel tutorials:

Remove Spaces in Excel - Leading, Trailing and Double Remove Extra Spaces in Excel (Leading, Trailing, Double Spaces)
Remove Extra Spaces in Excel (Leading, Trailing, Double Spaces)
FREE EXCEL TIPS EBOOK - Click here to get your copy
Watch Video – Remove Spaces in Excel
This Tutorial Covers:
How to Remove Spaces in Excel
Using the TRIM Function
Remove Extra Spaces in Excel using FIND and REPLACE
Removing Double Spaces
Removing Single Spaces
Remove Line Breaks
You may also like the following Excel tutorials:
FREE EXCEL BOOK
Get 51 Excel Tips Ebook to skyrocket your productivity and get work done faster
 =TRIM (CLEAN ( SUBSTITUTE (A1,CHAR (160)," ")))
Remove Extra Spaces in Excel using FIND and REPLACE
You can remove spaces in Excel using the Find and Replace functionality. This is a faster technique and can be useful in the given situations: When you want to remove double spaces. When you want to remove all the space characters. Removing Double Spaces
Note that this technique cannot be used to remove leading or trailing spaces. It will find and replace double spaces irrespective of its position. Here are the steps to do this: Select the cells from which you want to remove double spaces. Go to Home –> Find & Select –> Replace. ( You can also use the keyboard shortcut – Control + H).

=TRIM (CLEAN ( SUBSTITUTE (A1,CHAR (160)," ")))
Remove Extra Spaces in Excel using FIND and REPLACE
You can remove spaces in Excel using the Find and Replace functionality. This is a faster technique and can be useful in the given situations: When you want to remove double spaces. When you want to remove all the space characters. Removing Double Spaces
Note that this technique cannot be used to remove leading or trailing spaces. It will find and replace double spaces irrespective of its position. Here are the steps to do this: Select the cells from which you want to remove double spaces. Go to Home –> Find & Select –> Replace. ( You can also use the keyboard shortcut – Control + H).

Remove Spaces in Excel - Leading, Trailing and Double Remove Extra Spaces in Excel (Leading, Trailing, Double Spaces)
Remove Extra Spaces in Excel (Leading, Trailing, Double Spaces)
FREE EXCEL TIPS EBOOK - Click here to get your copy
Watch Video – Remove Spaces in Excel
This Tutorial Covers:
How to Remove Spaces in Excel
Using the TRIM Function
Remove Extra Spaces in Excel using FIND and REPLACE
Removing Double Spaces
Removing Single Spaces
Remove Line Breaks
You may also like the following Excel tutorials:
FREE EXCEL BOOK
Get 51 Excel Tips Ebook to skyrocket your productivity and get work done faster
 Find what: Single Space. Replace with: Leave this blank. Click on Replace All. This will remove all the space characters in the selected data set. Note that in this case, even if there are more than one space characters between two text strings or numbers, all of it would be removed. Remove Line Breaks
You can also use Find and Replace to quickly remove line breaks. Here are the steps to do this: Select the data.

Find what: Single Space. Replace with: Leave this blank. Click on Replace All. This will remove all the space characters in the selected data set. Note that in this case, even if there are more than one space characters between two text strings or numbers, all of it would be removed. Remove Line Breaks
You can also use Find and Replace to quickly remove line breaks. Here are the steps to do this: Select the data.

Remove spaces in Excel when trim doesn't work • AuditExcel.co.za Remove spaces in Excel when trim doesn’t work
Remove spaces in Excel when trim doesn’t work
Remove all the spaces including the spaces between words
What if Excel says there are no spaces (but you can see them!)
Subscribe to our YouTube Channel
Subscribe Now
Finding errors in your Excel spreadsheets with ExcelAnalyzer
Find inconsistent and overwritten formula in Excel. These are the easy spreadsheet errors to find.
 Remove spaces in Excel when trim doesn't work • AuditExcel.co.za

Home // Blog & Excel Tips // Remove spaces in Excel when trim doesn’t work
Remove spaces in Excel when trim doesn’t work
Adrian
Comments Closed
May 15, 2017
Oct 25, 2018
Uncategorised
An increasingly regular problem is to remove spaces in Excel when TRIM doesn’t work. TRIM is a great function for removing any extra spaces before and after a set of characters and limiting any spaces between words to a single space. But sometimes this still doesn’t work
Remove all the spaces including the spaces between words
If you don’t want to see even the single spaces you need to replace all the spaces with nothing. If you were using TRIM in a formula then the correct formula to rather use is SUBSTITUTE. So below in the SUBSTITUTE formula we tell it to
look at cell A2,
find all the ” ” (notice the gap between the inverted commas generated by clicking the space key on the keyboard)
replace them with “” (notice no gap- we are telling it to replace with nothing)
The instance number is left blank as we want everything to be replaced. What if Excel says there are no spaces (but you can see them!) If you do the above, or do a Find Replace, and Excel seems to ignore it and leave the spaces in, then it is likely that the ‘space’ you are looking at is not a space generated by your keyboard. There is an explanation for all of this but the quick fix is to copy the ‘space’ and paste that into your substitute function. So below we try the same thing and it doesn’t seem to make a difference. To remove these spaces from the Excel cell you would need to
highlight the gap in one of the cells
Copy the gap (easiest with CTRL + C)
Create the SUBSTITUTE formula but paste (CTRL + V) this item into the Old Text option (you won’t really see the difference but Excel sees the different type of space)
Now Excel will replace these so called spaces with nothing.

Remove spaces in Excel when trim doesn't work • AuditExcel.co.za

Remove spaces in Excel when trim doesn’t work
Remove spaces in Excel when trim doesn’t work
Remove all the spaces including the spaces between words
What if Excel says there are no spaces (but you can see them!)
Subscribe to our YouTube Channel
Subscribe Now
Finding errors in your Excel spreadsheets with ExcelAnalyzer
Find inconsistent and overwritten formula in Excel. These are the easy spreadsheet errors to find.

Remove Leading Spaces in Excel | Top 4 Methods to Remove Cell Spaces Remove Leading Spaces in Excel
Remove Leading Spaces in Excel
How to Remove Leading Spaces in Excel Cell?
#1 – Remove Unwanted Leading Spaces in Excel Cell Using TRIM Function
#2 – Remove Non-Breaking Leading Spaces in Excel Cell
#3 – Remove Double Spaces Using Excel FIND & REPLACE Method
#4 – Remove All Leading Spaces Using Excel FIND & REPLACE Method
Things to Remember
Recommended Articles
 #2 – Remove Non-Breaking Leading Spaces in Excel Cell
It is very easy to remove normal leading spaces in the excel cell. In the case of non-breaking leading spaces, the Trim function goes wrong. Look at the below image. Even after the Trim is applied, we don’t see the perfect sentence here. This is the problem with non-breaking leading spaces in an excel cell. Popular Course in this category
All in One Excel VBA Bundle (35 Courses with Projects)
4.9 (1,353 ratings) 35+ Courses | 120+ Hours | Full Lifetime Access | Certificate of Completion
View Course
Non-Breaking Leading Spaces in Excel Cell usually comes when we download the data from a web which is made up of the character CHAR (160). In these cases, we need to use TRIM and SUBSTITUTE excel function together. Firstly open the TRIM function. Now apply the SUBSTITUTE function. We need to select the text now, so select the A4 cell as the reference.

#2 – Remove Non-Breaking Leading Spaces in Excel Cell
It is very easy to remove normal leading spaces in the excel cell. In the case of non-breaking leading spaces, the Trim function goes wrong. Look at the below image. Even after the Trim is applied, we don’t see the perfect sentence here. This is the problem with non-breaking leading spaces in an excel cell. Popular Course in this category
All in One Excel VBA Bundle (35 Courses with Projects)
4.9 (1,353 ratings) 35+ Courses | 120+ Hours | Full Lifetime Access | Certificate of Completion
View Course
Non-Breaking Leading Spaces in Excel Cell usually comes when we download the data from a web which is made up of the character CHAR (160). In these cases, we need to use TRIM and SUBSTITUTE excel function together. Firstly open the TRIM function. Now apply the SUBSTITUTE function. We need to select the text now, so select the A4 cell as the reference.

Remove Spaces in Excel - Leading, Trailing and Double Remove Extra Spaces in Excel (Leading, Trailing, Double Spaces)
Remove Extra Spaces in Excel (Leading, Trailing, Double Spaces)
FREE EXCEL TIPS EBOOK - Click here to get your copy
Watch Video – Remove Spaces in Excel
This Tutorial Covers:
How to Remove Spaces in Excel
Using the TRIM Function
Remove Extra Spaces in Excel using FIND and REPLACE
Removing Double Spaces
Removing Single Spaces
Remove Line Breaks
You may also like the following Excel tutorials:
FREE EXCEL BOOK
Get 51 Excel Tips Ebook to skyrocket your productivity and get work done faster
 Click on Replace All. This will replace all the double spaces with a single space character. Note that this will only remove double spaces. If you have three space characters in between 2 words, it would result in 2 space characters (would remove one). In such cases, you can do this again to remove and any double spaces that might have been left. Removing Single Spaces
To remove all the space characters in a data set, follow the below steps: Select the cells from which you want to remove the space character. Go to Home –> Find & Select –> Replace. ( You can also use the keyboard shortcut – Control + H). In the Find and Replace dialogue box, enter:

Click on Replace All. This will replace all the double spaces with a single space character. Note that this will only remove double spaces. If you have three space characters in between 2 words, it would result in 2 space characters (would remove one). In such cases, you can do this again to remove and any double spaces that might have been left. Removing Single Spaces
To remove all the space characters in a data set, follow the below steps: Select the cells from which you want to remove the space character. Go to Home –> Find & Select –> Replace. ( You can also use the keyboard shortcut – Control + H). In the Find and Replace dialogue box, enter:

Remove Spaces in Excel - Leading, Trailing and Double Remove Extra Spaces in Excel (Leading, Trailing, Double Spaces)
Remove Extra Spaces in Excel (Leading, Trailing, Double Spaces)
FREE EXCEL TIPS EBOOK - Click here to get your copy
Watch Video – Remove Spaces in Excel
This Tutorial Covers:
How to Remove Spaces in Excel
Using the TRIM Function
Remove Extra Spaces in Excel using FIND and REPLACE
Removing Double Spaces
Removing Single Spaces
Remove Line Breaks
You may also like the following Excel tutorials:
FREE EXCEL BOOK
Get 51 Excel Tips Ebook to skyrocket your productivity and get work done faster
 In the Find and Replace dialogue box, enter: Find what: Double Space. Replace with: Single Space. Click on Replace All. This will replace all the double spaces with a single space character. Note that this will only remove double spaces. If you have three space characters in between 2 words, it would result in 2 space characters (would remove one). In such cases, you can do this again to remove and any double spaces that might have been left.

In the Find and Replace dialogue box, enter: Find what: Double Space. Replace with: Single Space. Click on Replace All. This will replace all the double spaces with a single space character. Note that this will only remove double spaces. If you have three space characters in between 2 words, it would result in 2 space characters (would remove one). In such cases, you can do this again to remove and any double spaces that might have been left.

Remove spaces in Excel when trim doesn't work • AuditExcel.co.za Remove spaces in Excel when trim doesn’t work
Remove spaces in Excel when trim doesn’t work
Remove all the spaces including the spaces between words
What if Excel says there are no spaces (but you can see them!)
Subscribe to our YouTube Channel
Subscribe Now
Finding errors in your Excel spreadsheets with ExcelAnalyzer
Find inconsistent and overwritten formula in Excel. These are the easy spreadsheet errors to find.
 What if Excel says there are no spaces (but you can see them!) If you do the above, or do a Find Replace, and Excel seems to ignore it and leave the spaces in, then it is likely that the ‘space’ you are looking at is not a space generated by your keyboard. There is an explanation for all of this but the quick fix is to copy the ‘space’ and paste that into your substitute function. So below we try the same thing and it doesn’t seem to make a difference. To remove these spaces from the Excel cell you would need to
highlight the gap in one of the cells
Copy the gap (easiest with CTRL + C)
Create the SUBSTITUTE formula but paste (CTRL + V) this item into the Old Text option (you won’t really see the difference but Excel sees the different type of space)
Now Excel will replace these so called spaces with nothing. Want to learn more about Microsoft Excel? If you prefer attending a course and live in South Africa look at the Johannesburg MS Excel 3 Day Advanced Course or the Cape Town MS Excel 3 Day Advanced training course. If you prefer online learning or live outside South Africa, look at our online MS Excel training courses. Subscribe to our YouTube Channel
We release a new video every weekday. Look out for our ‘Excel Hacks in 2 minutes or less’ playlist.

What if Excel says there are no spaces (but you can see them!) If you do the above, or do a Find Replace, and Excel seems to ignore it and leave the spaces in, then it is likely that the ‘space’ you are looking at is not a space generated by your keyboard. There is an explanation for all of this but the quick fix is to copy the ‘space’ and paste that into your substitute function. So below we try the same thing and it doesn’t seem to make a difference. To remove these spaces from the Excel cell you would need to
highlight the gap in one of the cells
Copy the gap (easiest with CTRL + C)
Create the SUBSTITUTE formula but paste (CTRL + V) this item into the Old Text option (you won’t really see the difference but Excel sees the different type of space)
Now Excel will replace these so called spaces with nothing. Want to learn more about Microsoft Excel? If you prefer attending a course and live in South Africa look at the Johannesburg MS Excel 3 Day Advanced Course or the Cape Town MS Excel 3 Day Advanced training course. If you prefer online learning or live outside South Africa, look at our online MS Excel training courses. Subscribe to our YouTube Channel
We release a new video every weekday. Look out for our ‘Excel Hacks in 2 minutes or less’ playlist.