The Excel LEN function returns the length of a given text string as the number of characters. LEN will also count characters in numbers, but number formatting is not included.
Syntax
The syntax for the LEN function in Microsoft Excel is:
=LEN( text )
Parameters or Arguments
text
The string to return the length for.
Excel Len Function Examples
In the spreadsheet below, the Len function is used to return the length of three different text strings (one of which is empty).
Formulas:
Results:
Notes
- LEN is a useful when you want to count how many characters there are in some text.
- Numbers and dates will also return a length.
- Number formatting is not included. (i.e. the length of “100” formatted as “$100.00” is still 3).