LEN

LEN(text)

Counts the characters in a piece of text, such as a task name, to find names that are too long or codes that don't follow the pattern. A blank field gives blank, not 0 as Excel would.

Arguments

ArgumentWhat to give it
textText, like [Name], [Task code] or an attribute. A choice field such as [Status] works too. Blank gives blank.

Examples

Formula
=LEN([Name])

How many characters the task name has, spaces included.

Formula
=LEN([Task code]) <> 5

As a guardrail, flags task codes that aren't five characters long.

Formula
=LEN(COALESCE([Phase], ""))

The length of the phase, with 0 for tasks where it isn't set.

Formula on resources
=LEN([Name])

On a resource: the length of its name.

Reach for something else when

You wantUse
Whether the text is set at allISBLANK
The text without stray spaces before countingTRIM

Common questions

Why is LEN blank for some rows and not 0?

A field that isn't set is blank, and blank is never turned into empty text. Give it a fallback with COALESCE: LEN(COALESCE([Phase], "")). See blanks and errors.