Excel functions / Text

LEN

Returns the number of characters in some text, including spaces.

Syntax=LEN(text)

Arguments

textThe 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

D2=LEN(A2)
ABCD
1NameEmail
2Nina Shahnina.shah@example.com9
3Omar Reidomar@example.com
4Mary Ann Leemary.lee@example.com
5

Result: 9. Nina Shah is 9 characters, including the space.

Tips

Practise LEN

Try it yourself in a real spreadsheet, with instant feedback on every answer.

Start the exercise

Related