Wauvel

Excel like a finance pro.

The functions, VBA, and shortcuts a finance operator actually uses — curated, with CFO examples. Prefer them pre-built? Grab a ready-made model.

← All functions

LEN

Text & cleanup

Count the characters in a cell — the quiet workhorse behind validation and cleanup.

Difficulty

Beginner
Excel file

1What is it?

LEN returns how many characters are in a text string, spaces included. On its own it's simple, but it's the function you lean on to validate and diagnose: confirm a code is exactly the right length, spot the trailing space that's breaking a lookup (LEN before vs after TRIM), or find the position to slice at by combining it with FIND. It counts every character — letters, digits, punctuation, and spaces alike.

2What it looks like

LEN(text)
text
The string to measure — usually a cell.

3When you use it

  • Validate a fixed-length code: =IF(LEN(A2)=9, "OK", "Wrong length").
  • Prove TRIM removed characters: compare LEN(A2) with LEN(TRIM(A2)).
  • Count from the end: RIGHT(A2, LEN(A2) - FIND("-", A2)).

4See it in action

Change the inputs — the formula and result update live. Prefer the real thing? Download the Excel file and open it in Excel.

LEN counts every character, spaces included — which is how it catches the trailing spaces that break lookups. The result is in quotes so you can see the edges.

C2
fx
=LEN(B2)11 chars · LEN(TRIM(B2)) = 7
ABC
1FieldValueResult
2Text AA-1024 11 chars · LEN(TRIM(B2)) = 7

The lime cell holds the formula — click it (or any cell) to see its contents in the bar above, just like Excel. Edit the blue cells to watch it recompute.

5Common errors

Counts hidden spacesA trailing or non-breaking space inflates the length.

Fix: That's the point — LEN reveals them; TRIM (or SUBSTITUTE for CHAR(160)) removes them.

#VALUE!The reference is an error cell.

Fix: Fix the upstream error; LEN needs text or a number, not an error.

Counts a number's digits oddlyYou measured a formatted number ($1,234) expecting the display.

Fix: LEN sees the underlying value (1234 → 4), not the formatted text — use TEXT() first to measure the display.

6Better functions & alternatives

  • TRIM The usual next step once LEN reveals stray spaces.
  • FIND / SEARCH Pair with LEN to slice a string at a marker.
  • SUBSTITUTE Count occurrences: (LEN(A2) - LEN(SUBSTITUTE(A2, x, ""))) / LEN(x).

Want LEN already wired into a model? Wauvel's free tools download as branded, formula-driven Excel.

Learn the moves here — or let Wauvel run them on your numbers.

Get my free report →