Skip to content

TRIM

TextExcel 2007

Remove leading, trailing and repeated inner spaces.

Syntax

TRIM(text)

How it works

Removes ASCII space (32) only. It leaves single spaces between words. For non-breaking spaces from web data, also SUBSTITUTE CHAR(160).

Examples

=TRIM(" order 1042 ")

order 1042

Related functions

More Text functions

← All 510 functions

Syntax follows Microsoft’s documentation. Examples are written to be pasted into a cell and checked. Argument separators may be ; in your locale. The AI explainer runs on a free community model — verify anything important.