LEN

Returns the length of the value passed to the function.

Syntax

= LEN(value)

Parameters

value

A string whose length is to be determined.  The value can be specified as an integer (e.g., 37), a decimal value (e.g., 37.48), as a string (“word”), or as the value of a variable (e.g, UnitPrice).

Return Type

Integer

In the case of an error, the function displays an error message: “LEN(value): Error message”

The function can be used in combination with other functions.

Examples

Example

Returns

= LEN(“test”)

4

= LEN(“Iron Speed Designer”)

19

= LEN(OrderID)

The number of digits in the value of OrderID

= LEN(“$1234”)

5

= LEN(REPLACE(“This is good”, 9, 4, “bad”)

The length of the replaced string.

= LEN(CONCATENATE(“Iron”, “Speed”, “Designer”))

length of concatenated version of all the strings.