Excel Formulas to Remove the Leading and Trailing Spaces From Text!!

Have you ever tried to delete the extra spaces on your text string by using the formula in Excel? In this chapter, we will show the simple formulas to remove the leading and trailing spaces from the text string in Excel. Let’s dive into this article!! Get an official version of ** MS Excel** from the following link: https://www.microsoft.com/en-in/microsoft-365/excel

General Formula:

  • You can use the below formula to remove the leading and trailing spaces from the text string in Excel.

=TRIM(text)

Syntax Explanations:

  • TRIM – This function will help to remove the extra spaces from the text and there is no space at the start or end of the text string. Read more on the TRIM function.
  • Text – It represents the input value.
  • Comma symbol (,) – It is a separator that helps to separate a list of values.
  • Parenthesis () – The main purpose of this symbol is to group the elements.

Example:

Refer to the below example image.

  • Here we will enter the input text strings in Column B.
  • Now we are going to delete all the extra spaces from the starting and end of the text string.
  • Select any cell and type the above-given formula.
  • Finally, press the ** ENTER** key, you can get the result as shown below.

Wind-Up:

From this guide, you can get some clarification on how to remove the leading and trailing spaces from the text string in Excel. Hope you like this article. Please feel free to state your query or feedback for the above article.

Thank you so much for visiting *Geek Excel!! **If you want to learn more helpful formulas, check out Excel Formulas *!! **

Read Ahead:

28