Excel LEN Function
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.
- text - The text for which to calculate length.
The LEN function returns the number of characters in a given text string. LEN takes just one argument, text. LEN counts the number of characters in text, including space and punctuation, and returns a number as the result. If text is an empty string ("") or text is a reference to an empty cell, LEN returns zero. LEN will also count characters in numbers, but number formatting is not included.
LEN returns the count of characters in a text string:
=LEN("apple") // returns 5
Space characters are included in the count:
=LEN("apple ") // returns 6
LEN also works with numeric values, but number formatting is not included:
FIND returns the position of the character, which is subtracted from length, calculated with LEN. RIGHT returns the text to the right of that position. Full explanation here.
- LEN returns the length of text as a number.
- LEN works with numbers, but number formatting is not included.
- LEN returns zero if a value is empty.