Skip to content

Lessons in your language are coming soon. Formulas already work in your Excel language.

This page isn't translated yet, so its text is in English. Function names and formulas are shown in your Excel language.

Excel function · Finding text

LEN

Counts the characters in a text.

What it does

LEN returns how many characters a text has. Spaces, punctuation and digits all count. It is useful for checking codes that must have a fixed length, and as a building block with LEFT, RIGHT and MID.

Syntax

=LEN(text)

Arguments in square brackets are optional, and … means you can add more of the same. In this Excel language, arguments are separated by ;

Arguments

text
The text to measure, usually a cell.

Example

Stock codes should be 9 characters long. Is this one?

AB
1CodeLength
2SKU-405189

The formula in B2:

=LEN(A2)

Result: 9

SKU-40518 has three letters, a hyphen and five digits: 3 + 1 + 5 = 9.

Common mistakes

  • Forgetting that spaces count, including ones you can't see at the end of a cell. Clean them with TRIM first.
  • Expecting a number's formatting to count. LEN measures the stored value, so 0.5 shown as 50% still has 3 characters.

In other Excel languages

Excel translates function names, and in some languages the argument separator too. Type the name your Excel shows.

Excel languageFunction nameSeparator
EnglishLEN,
DeutschLÄNGE;
FrançaisNBCAR;
Español (España)LARGO;
Español (México)LARGO,
日本語LEN,
한국어LEN,
繁體中文LEN,
ไทยLEN,
ខ្មែរLEN,
Tiếng ViệtLEN;

Practise it

More from this module

All functions