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:

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”.

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.

REPLACE
To replace part of a text string with new substrings based on given position in a selected text.