TRIM

TRIM(text)

Removes spaces from both ends of a piece of text, the kind an import or a pasted name leaves behind. Unlike Excel's TRIM, it leaves the spaces inside the text alone, so two spaces between words stay two.

Arguments

ArgumentWhat to give it
textText, like [Name] or an attribute. Blank gives blank.

Examples

Formula
=TRIM([Name])

The task name without leading or trailing spaces.

Formula
=LEN([Name]) <> LEN(TRIM([Name]))

As a guardrail, flags task names that start or end with a space.

Formula on resources
=TRIM([Name])

On a resource: its name without spaces at either end.

Reach for something else when

You wantUse
Spaces inside the text changed tooSUBSTITUTE: SUBSTITUTE([Name], " ", " ")
How long the text isLEN