1. Calculation functions
  2. All Functions
  3. Miscellaneous Functions
  4. LENGTH

Returns the number of characters in a text string.

Syntax

LENGTH(x)

where:

  • x: Text-formatted line item to evaluate.

Format

Input Format Output Format

x: Text

Number

Arguments

The function uses the following arguments:

  • x: Text: Text-formatted line item, text constant, list-formatted line item, or general expression

Constraints

The function has the following constraints:

  • Source must be text-formatted.
  • Result must be number-formatted.
  • White spaces are counted for text string length.
  • If source is blank, the function returns 0.

Excel equivalent

Back to Top

Example

In this example, the number-formatted Text Length 1 result line item returns the length of text entered into the text-formatted Profit Status line source line item:

LEN(Profit Status)

You can use the NAME function nested within a LENGTH formula to return the text string length of a list-formatted line item. In this example, the number-formatted Text Length 2 result line item uses NAME to return the list item selected in the list-formatted Sales Personnel source as text and then LENGTH returns the length of the text string:

LENGTH(NAME(Sales Personnel))

Back to Top

Similar functions