Excel Trim Function

Excel Trim function is very useful function that removes extra spaces from data. This formula removes all spaces from data except for single space between words. While validating data on the basis of length of cell, the trim function can give you valid length by removing spaces from beginning, spaces from end and extra spaces between words.

This can be useful for refining raw data received from any external application with irregular spacing.

Syntax And Examples:

Trimming extra spaces from plain text:


Trimming extra spaces from text in a cell:

=TRIM(Cell Reference)

1 Excel Bee
3 =TRIM(A1)

Result in A3: Excel Bee

We have kept two spaces between “Excel” and “Bee” in A1 cell and the trim function has trimmed extra spaces and gave output with single space left between words.

Extra Tips:

Watch Video Tutorial