TRIM Function

About

TRIM function in Excel is used to remove the extra spaces from text. After applying TRIM function, multiple spaces in between text strings will be trimmed to a single space and there won’t be any space character at the start and end of the data.

Function Type

Text

Purpose

Remove extra spaces.

Return value

Text without unnecessary spaces

Syntax

=TRIM(text)

Arguments

text – text data from which extra spaces are to be removed.


Example


Notes

TRIM removes only the ASCII space character (32) from text data. To remove the first 32 non-printing characters (ASCII values from 0 to 31), use CLEAN function.


Read about Excel Functions

Excel Functions in Alphabetical Order (Complete list)

Complete List of Excel Functions (Category wise)


New Dynamic Array Functions in Excel

LET Function in Excel

STOCKHISTORY Function in Excel