Share on twitter
Share on linkedin
Share on facebook
Share on pinterest
Share on email
Share on print
Share on twitter
Share on linkedin
Share on facebook
Share on pinterest
Share on email
Share on print

TRIM

Remove unnecessary spaces from text in Excel
Removes excess spaces from strings

Rational

Remove unnecessary spaces from text.

Description

The Excel TRIM function removes excess spaces from a text string except for one space between each word. For example, =TRIM(“Hello World”) [Three spaces] return “Hello World”.

Syntax

=TRIM (text)

Parameters

text – The text with unnecessary space

Return Value

The text without extra blanks

Key Notes

  • The TRIM function leaves only a single space between words. For example, =TRIM(“Hello Wo rld”) [three spaces and two spaces between three texts] return “Hello Wo rld” (only one space between three texts).
  • The TRIM function only removes the ASCII space character (32) – “ “ (Space) from a text.
  • The function also removes space
  • characters at the start or end of the text.

If a user want to remove spaces which are hidden in a cell, for this we will apply TRIM function in Excel.

Keep Reading Similar Functions:

Substitutes new text for old text in a text string in Excel

SUBSTITUTE

The SUBSTITUTE function replace the specific text in a text string that occurs in a specific location. i.e, =SUBSTITUTE(“Butter”,”t”,”l”,2) return “Butler”.

Read More »
To replace part of a text string in Excel

REPLACE

The REPLACE function substitute part of a text string with a new text string. I.e., =REPLACE(“Michael Jackson”,9,6,”Jorda”) returns “Michael Jordan”.

Read More »
Removes non-printable characters from a string in Excel

CLEAN

The CLEAN function delete the non-printable characters from 1 to 31 of the ANSI character set, the “garbage” characters that often appear after importing texts.

Read More »