Excel functions / Text
LEN
Returns the number of characters in some text, including spaces.
Syntax
=LEN(text)Arguments
text | The cell or text to measure. |
|---|
How it works
LEN counts every character: letters, digits, punctuation and spaces. Use it to check that IDs and phone numbers are the right length, or to find cells with hidden extra spaces.
It also pairs with LEFT and RIGHT: =RIGHT(A2,LEN(A2)-3) removes the first three characters.
Example
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Name | |||
| 2 | Nina Shah | nina.shah@example.com | 9 | |
| 3 | Omar Reid | omar@example.com | ||
| 4 | Mary Ann Lee | mary.lee@example.com | ||
| 5 |
Result: 9. Nina Shah is 9 characters, including the space.
Tips
- If LEN(A2) and LEN(TRIM(A2)) differ, the cell has extra spaces.
Practise LEN
Try it yourself in a real spreadsheet, with instant feedback on every answer.