|
LEN
LEN returns the number of characters in a text string.
Syntax
LEN(text)
Text is the text whose length you want to find. Spaces count as characters.
Example
The example may be easier to understand if you copy it to a blank spreadsheet.
- Create a blank spreadsheet.
- Select the example in the Help topic.
![]()
Selecting an example from Help
- Press CTRL+C.
- In the spreadsheet, select cell A1, and press CTRL+V.
- To switch between viewing the formula that returns the result and the result in the cell, select the cell and press F2 and then ENTER, or click Commands and Options on the spreadsheet toolbar, click the Formula tab, and look in the Formula in active cell (active cell) box.
Data | |
---|---|
Phoenix, AZ | |
One | |
Formula | Description (Result) |
=LEN(A2) | Length of the first string (11) |
=LEN(A3) | Length of the second string (0) |
=LEN(A4) | Length of the third string, which includes 5 spaces (8) |