Excel LEN function
Counts the characters in a text, spaces included. In Spanish Excel it is called LARGO.
Syntax
English Excel
=LEN(text)
Spanish Excel (Mexico)
=LARGO(texto)
Spanish Excel (Spain, Latin America)
=LARGO(texto)
| Argument | What it is |
|---|---|
| text | The text or cell. |
Example
LEN counts the characters in a text, spaces included. TRIM removes leading and trailing spaces and leaves a single space between words. You can nest one function inside the other.
=LEN(TRIM(A2))
Common mistake
If the result is bigger than expected there are probably extra spaces: combine it with TRIM.
About Ads
This site uses Google AdSense to display ads. These ads help us keep WebHerramientas completely free. Ads are managed by Google and meet strict security and privacy standards.
Ads help us keep WebHerramientas free for everyone
Practice LEN
Type the formula in the sheet and check it instantly. Spanish or English function names both work. See all lessons
TRIM and LEN
LEN counts the characters in a text, spaces included. TRIM removes leading and trailing spaces and leaves a single space between words. You can nest one function inside the other.
In B2, count the characters in the text after removing the extra spaces.
| A | B | C | |
|---|---|---|---|
| 1 | Text | Characters | |
| 2 | Hello world | ||
| 3 | Excel in English | ||
| 4 | Formulas | ||
| 5 | Pivot table | ||
| 6 | VLOOKUP | ||
| 7 |
Tip: while typing, click a cell or drag across several to insert their reference.
Frequently asked questions
- What is LEN called in Spanish?
- In Spanish Excel it is LARGO. The formula =LEN(TRIM(A2)) is written =LARGO(ESPACIOS(A2)) (or with commas in Mexico).
- Why does LEN use semicolons in some Excel versions?
- It depends on regional settings. Where the comma is the decimal mark (Spain, much of South America), Excel separates arguments with semicolons. English Excel and Mexican Spanish Excel use commas.
- What is the most common LEN mistake?
- If the result is bigger than expected there are probably extra spaces: combine it with TRIM.