The Excel LEN function is a Text formula that returns the number of characters in a given string. In this guide, we’re going to show you how to use the Excel LEN function and also go over some tips and error handling methods.
- All Excel versions
Excel LEN Function Syntax
The text that you want to calculate length.
Basic Use Case
The LEN function requires only a single argument - Enter the text string or the reference that contains the target string to get. For example,
The Excel LEN function ignores the number formatting in target cells. Thus, you will get the same number from the same value, even if formatted differently.
- The Excel LEN function counts space characters.
- LEN counts decimal separators ("." In US, "," in Europe).
- Thousand separators are not counted, since they are used for number formatting.
- Excel evaluates date values as a number, starting from 1. The 1 represents the date 1/1/1900, so a current date like 4/17/2019 is equal to 43572. The LEN function counts the number of digits of the serial number, not formatted date.
- Note that the TEXT function returns a string that contains currency symbols or thousand separators as characters, not as an element of number formatting. As a result, LEN function counts symbols and thousand separators as well. For example,