Syntax
=LEN(text)
text- The text or cell to measure.
LEN counts the characters in a piece of text, including spaces and punctuation. Use it to check length limits or as a building block for extracting text.
=LEN(text)
textHow many characters are in the headline in A2? Answer in B2.
Tip: while typing a formula, click a cell or drag across cells to insert references. Press Enter to check, and Tab to accept a function suggestion.
Each example below runs against this sample sheet. The results are calculated by the same engine as the practice grid.
| A | B | C | |
|---|---|---|---|
| 1 | Raw name | SKU | Note |
| 2 | maya PATEL | ELC-0427-NY | Refund requested |
| 3 | leo rossi | FUR-1180-TX | Shipped |
| 4 | AVA KIM | OFC-0093-CA | Refund issued |
| Formula | Result | What it shows |
|---|---|---|
=LEN(A2) | 15 | Includes all the stray spaces. |
=LEN(TRIM(A2)) | 10 | Length after cleaning up spaces. |
=LEN(B2) | 11 | SKUs should all be 11 characters. |
Learning step by step? LEN is covered in Lesson 23: LEN & TRIM of the free course.