Skip to main content

Quickly remove spaces before / after text or remove extra spaces from text in Excel

Author: Xiaoyang Last Modified: 2024-11-29

Kutools for Excel

Boosts Excel With 300+
Powerful Features

Sometimes, when you operating an Excel file, you may need to delete or remove spaces before or after the text, or delete extra spaces from text. With the Remove Spaces utility of Kutools for Excel, you can quickly do following options:

Remove spaces before text string (remove leading spaces from text string)

Remove spaces after text string (remove trailing spaces from text string)

Remove leading and trailing spaces from text string

Remove extra spaces from text string

Remove all spaces from text string


Click Kutools >> Text >> Remove Spaces. See screenshots:

shot-remove-spaces-1 shot-arrow shot-remove-spaces-2

Remove spaces before text string (remove leading spaces from text string)

You can delete or remove spaces before text string (remove leading spaces from text string) as follows:

1. Select the range that you need to remove the leading spaces.

2. Apply this utility (click Kutools > Text > Remove Spaces).

3. In the Remove Spaces dialog box, please check Leading spaces from Spaces Type. And you can preview the result in the Preview box. See screenshot:

shot-remove-spaces-3

4. Click Ok or Apply. All of the leading spaces before the text string have been removed. See screenshots:

shot-remove-spaces-4 shot-arrow shot-remove-spaces-5

Note: Click Ok button will apply the operation and close the dialog box, but click Apply will only apply the operation without closing the dialog box.


Remove spaces after text string (remove trailing spaces from text string)

Trailing spaces in text string / spaces after text string. Please see:

shot-remove-spaces-6

As you see in the above screenshot, there is a lot of space characters after the text string and before the cursor position. And you can delete or remove such spaces after text string (remove trailing spaces from text string) as shown in the above screenshot as follows:

1. Select the range that you need to remove the trailing spaces.

2. Apply this utility (click Kutools > Text > Remove Spaces).

3. In the Remove Spaces dialog box, please check Trailing spaces from Spaces Type. See screenshot:

shot-remove-spaces-7

4. Click Ok or Apply. All of the trailing spaces after the text string have been removed. See screenshots:

shot-remove-spaces-6 shot-arrow shot-remove-spaces-8

Remove leading and trailing spaces from text string

If you want to remove or delete both the leading spaces and trailing spaces from text string, you can get it done as follows:

1. Select the range that you need to remove both the leading and trailing spaces.

2. Apply this utility (click Kutools > Text > Remove Spaces).

3. In the Remove Spaces dialog box, please check Leading & Trailing spaces from Spaces Type. See screenshot:

shot-remove-spaces-9

4. Click Ok or Apply. All of the leading and trailing spaces within the text strings have been removed. See screenshots:

shot-remove-spaces-4 shot-arrow shot-remove-spaces-5

Remove extra spaces from text string

With this function, you can quickly remove extra spaces between the texts as well.

1. Select the range that you need to remove extra spaces from text.

2. Go to the Remove Spaces dialog box by clicking Kutools > Text > Remove Spaces.

3. Select All excess spaces from Spaces Type, and you can preview the result in the Preview box. See screenshot:

shot-remove-spaces-10

4. Click Ok or Apply. All of the excess spaces between the text values have been removed. see screenshots:

shot-remove-spaces-11 shot-arrow shot-remove-spaces-12

Remove all spaces from text string

Supposing you want to remove all of the spaces between the text values, the following steps can help you quickly deal with it.

1. Highlight the range that you want to remove all spaces fro text.

2. Go to the Remove Spaces dialog box by clicking Kutools > Text > Remove Spaces.

3. Select All spaces from Spaces Type, and you can preview the result in the Preview box. See screenshot:

shot-remove-spaces-13

4. Click Ok or Apply. All of the spaces between the text values have been removed. see screenshots:

shot-remove-spaces-14 shot-arrow shot-remove-spaces-15

Notes:

1. This utility supports Undo, and the undo is only one level.

2. shot-remove-spaces-16 Share this feature to your friend or social media button: If you like this feature and want to share it to your friends or other social media, please click this button in the Remove Spaces dialog box. See screenshot:

shot-remove-spaces-17


Demo: Remove spaces before or after text or remove extra spaces from text in Excel

 
Kutools for Excel: Over 300 handy tools at your fingertips! Enjoy permanently free AI features! Download Now!

Productivity Tools Recommended

Office Tab: Use handy tabs in Microsoft Office, just like Chrome, Firefox, and the new Edge browser. Easily switch between documents with tabs — no more cluttered windows. Know more...

Kutools for Outlook: Kutools for Outlook offers 100+ powerful features for Microsoft Outlook 2010–2024 (and later versions), as well as Microsoft 365, helping you simplify email management and boost productivity. Know more...


Kutools for Excel

Kutools for Excel offers 300+ advanced features to streamline your work in Excel 2010 – 2024 and Microsoft 365. The feature above is just one of many time-saving tools included.

šŸŒ Supports 40+ interface languages
āœ… Trusted by 500,000+ users and 80,000+ businesses worldwide
šŸš€ Compatible with all modern Excel versions
šŸŽ 30-day full-featured trial — no registration, no limitations
Kutools for Excel RibbonKutools for Excel Ribbon