LEN Formula Generator
LEN returns the number of characters in a text string — letters, numbers, spaces, punctuation all count. Useful for validation and text manipulation.
Syntax
=LEN(text)Try it — generate a LEN formula
Examples
Count characters in a cell
=LEN(A2)"Hello world" → 11 (spaces count).
Flag cells exceeding a limit
=IF(LEN(A2)>280, "Too long", "OK")Useful for tweet validation or form-field limits.
Count non-blank rows
=SUMPRODUCT(--(LEN(A2:A100)>0))Counts how many cells contain anything — text, numbers, spaces.
Tips
- ✓LEN counts spaces. Use TRIM first if leading/trailing spaces shouldn't count.
- ✓LEN on a number returns the digits when rendered — LEN(12.5) is 4.
- ✓Use with LEFT / RIGHT / MID for dynamic text extraction: =LEFT(A2, LEN(A2)-3).
Related Formulas
Text Split / Extract
Split text into parts, extract substrings, or parse structured data like email a...
CONCATENATE / TEXTJOIN
Combine text from multiple cells into one. TEXTJOIN is the modern approach with ...
REGEXEXTRACT / REGEXMATCH / REGEXREPLACE
Google Sheets has three regex functions: REGEXEXTRACT (pull matched text), REGEX...
Need a different formula?
Describe any formula in plain English and FormulaPad will generate it.
Try FormulaPad Free