Remove Spaces Before/After Text or Remove Extra Spaces from Text in Excel!!
Tags: kutoolsexceltutorial, removespacesbeforeaf, kutools
Published: 2020-11-17 10:55:13

---
title: Remove Spaces Before/After Text or Remove Extra Spaces from Text in Excel!!
published: true
date: 2020-11-17 09:22:37 UTC
tags: KutoolsExcelTutorial,RemoveSpacesBeforeAf,Kutools
canonical_url: https://geekexcel.com/remove-spaces-before-after-text-or-remove-extra-spaces-from-text-in-excel/
---

In this tutorial, you will learn the steps to **Remove Spaces Before/After Text or Remove Extra Spaces from Text in Excel Office 365** using **Kutools.** Get an official version of MS Excel from the following link: **[https://www.microsoft.com/en-in/microsoft-365/excel](https://www.microsoft.com/en-in/microsoft-365/excel)**

**Note:** [kutools for Excel](https://geekexcel.com/get-kutools-for-ms-excel-2019-2016-2013-2010-2007-office-365/) has more than 180 features which are used to complete the difficult task with several clicks. If you want to use Kutools, you need to install it from Excel’s official website.
# Remove Spaces Before Text String:

If you want to remove spaces before text string in Excel, do as follows.

- First, you need to **select the range** that you need to remove the **leading spaces**.

![Select the range](https://eadn-wc04-371788.nxedge.io/cdn/wp-content/uploads/2020/11/1-25.png)<figcaption id="caption-attachment-17489">Select the range</figcaption>

- On the **Kutools Tab, select** the **Text** option, then **choose** the **Remove Spaces** option.

![Select the Remove Spaces option](https://eadn-wc04-371788.nxedge.io/cdn/wp-content/uploads/2020/11/Select-the-Remove-Spaces-option.png)<figcaption id="caption-attachment-17490">Select the Remove Spaces option</figcaption>

- It will open the **Remove Spaces Dialog Box.**
- **Spaces Type –** You need to **select** the **Leading Spaces** option under this section.
- You can see the preview result in the **Preview Pane**.

![Remove Spaces Dialog Box](https://eadn-wc04-371788.nxedge.io/cdn/wp-content/uploads/2020/11/2-24.png)<figcaption id="caption-attachment-17491">Remove Spaces Dialog Box</figcaption>

- Then, **hit** the **OK** button. You can see all the leading spaces before the text string has been removed as shown in the below image.

![Result](https://eadn-wc04-371788.nxedge.io/cdn/wp-content/uploads/2020/11/Result-18.png)<figcaption id="caption-attachment-17492">Result</figcaption>

## Steps to Remove Spaces After Text String:

If you want to remove trailing spaces in the text string, please do as follows.

- In the below screenshot, you can see a lot of space characters after the text string ( **before the cursor position** ). We are going to delete those space characters by doing the below steps.
- You need to **select the range** that you need to remove the trailing spaces.

![Select the range](https://eadn-wc04-371788.nxedge.io/cdn/wp-content/uploads/2020/11/3-24.png)<figcaption id="caption-attachment-17493">Select the range</figcaption>

- On the **Kutools Tab, select** the **Text** option, choose the **Remove Spaces** option.

![Select the Remove Spaces option](https://eadn-wc04-371788.nxedge.io/cdn/wp-content/uploads/2020/11/Select-the-Remove-Spaces-option.png)<figcaption id="caption-attachment-17490">Select the Remove Spaces option</figcaption>

- It will display the **Remove Spaces Dialog box**.
- **Spaces Type – ** You need to **select** the **Trailing space** option.
- Then, **click** the **OK** button to get the result as shown in the below image.

![Remove Spaces Dialog box](https://eadn-wc04-371788.nxedge.io/cdn/wp-content/uploads/2020/11/4-20.png)<figcaption id="caption-attachment-17494">Remove Spaces Dialog box</figcaption>

- Now, all the trailing spaces after the text string have been removed.

![Result](https://eadn-wc04-371788.nxedge.io/cdn/wp-content/uploads/2020/11/5-16.png)<figcaption id="caption-attachment-17495">Result</figcaption>

## Delete Leading & Trailing Spaces from Text String:

To delete leading and trailing spaces from the input text string, follow the below steps.

- First, you need to **select the range** that you need to remove both the leading and trailing spaces from the input strings.

![Input Range](https://eadn-wc04-371788.nxedge.io/cdn/wp-content/uploads/2020/11/6-15.png)<figcaption id="caption-attachment-17497">Input Range</figcaption>

- Go to the **Kutools Tab, select** the **Text** option, choose the **Remove Spaces** option.

![Select the Remove Spaces option](https://eadn-wc04-371788.nxedge.io/cdn/wp-content/uploads/2020/11/Select-the-Remove-Spaces-option.png)<figcaption id="caption-attachment-17490">Select the Remove Spaces option</figcaption>

- It will display the **Remove Spaces Dialog box**.
- **Spaces Type – ** Here, you need to **check** the **Leading & Trailing spaces** option.

![Hit the OK button](https://eadn-wc04-371788.nxedge.io/cdn/wp-content/uploads/2020/11/7-13.png)<figcaption id="caption-attachment-17498">Hit the OK button</figcaption>

- Then, **hit** the **OK** button. You can see that all the leading and trailing spaces are removed from the selected range as shown in the below image.

![Output](https://eadn-wc04-371788.nxedge.io/cdn/wp-content/uploads/2020/11/8-13.png)<figcaption id="caption-attachment-17499">Output</figcaption>

## Remove Extra Spaces from Text String:

You can remove extra spaces from text strings by doing the below steps.

- You need to **select the range** that you need to remove extra spaces from the input text.

![Input Range](https://eadn-wc04-371788.nxedge.io/cdn/wp-content/uploads/2020/11/9-10.png)<figcaption id="caption-attachment-17500">Input Range</figcaption>

- Go to the **Kutools Tab, select** the **Text** option, choose the **Remove Spaces** option.

![Select the Remove Spaces option](https://eadn-wc04-371788.nxedge.io/cdn/wp-content/uploads/2020/11/Select-the-Remove-Spaces-option.png)<figcaption id="caption-attachment-17490">Select the Remove Spaces option</figcaption>

- It will display the **Remove Spaces Dialog box**.
- **Spaces Type – ** You need to **select** the  **All excess spaces** option.
- You can preview the result in the **Preview box.**

![Remove Spaces Dialog box](https://eadn-wc04-371788.nxedge.io/cdn/wp-content/uploads/2020/11/10-9.png)<figcaption id="caption-attachment-17501">Remove Spaces Dialog box</figcaption>

- At last, you need to **click** the **OK** button.
- You can see that all the excess spaces between the text values have been removed as shown in the screenshot.

![Output](https://eadn-wc04-371788.nxedge.io/cdn/wp-content/uploads/2020/11/11-6.png)<figcaption id="caption-attachment-17502">Output</figcaption>

## Delete All Spaces from Text String:

To delete all spaces from text strings in Excel, do as follows.

- You need to **select the range** that you want to remove all spaces from the text.

![select the range](https://eadn-wc04-371788.nxedge.io/cdn/wp-content/uploads/2020/11/12-6.png)<figcaption id="caption-attachment-17503">select the range</figcaption>

- On the **Kutools Tab, select** the **Text** option, choose the **Remove Spaces** option.

![Select the Remove Spaces option](https://eadn-wc04-371788.nxedge.io/cdn/wp-content/uploads/2020/11/Select-the-Remove-Spaces-option.png)<figcaption id="caption-attachment-17490">Select the Remove Spaces option</figcaption>

- It will display the **Remove Spaces Dialog box**.
- **Spaces Type –** From this section, you need to **select** the **All spaces** option.
- You can preview the result in the **Preview Pane.**
- Finally, **click** the **OK** button.

![Click the OK button](https://eadn-wc04-371788.nxedge.io/cdn/wp-content/uploads/2020/11/13-5.png)<figcaption id="caption-attachment-17504">Click the OK button</figcaption>

- Now, you can see that all the spaces between text values have been removed from the selected range as shown in the below image.

![Result](https://eadn-wc04-371788.nxedge.io/cdn/wp-content/uploads/2020/11/14-5.png)<figcaption id="caption-attachment-17505">Result</figcaption>

## A Brief Summary:

In this tutorial, you can easily understand the steps to **Remove Spaces Before/After Text or Remove Extra Spaces from Text in Excel Office 365** using **Kutools. ** Give your **feedback/suggestions** in the below comment box. Thanks for visiting **[Geek Excel.](https://geekexcel.com/)** Keep Learning!

### Read Also:

- [How to Delete Characters from Beginning or End of the Text Strings?](https://geekexcel.com/how-to-delete-characters-from-beginning-or-end-of-the-text-strings/)
- [Reverse Text String or Words Order in Excel Office 365!!](https://geekexcel.com/reverse-text-string-or-words-order-in-excel-office-365/)