LEN Function in Excel
Beginner
Returns the number of characters in a text string.
Syntax
=LEN(text)Example
Use Case
Count the length of a password.
Common Errors to Avoid
- Counts all characters including spaces and special characters
- Numbers are counted as text characters, not digits
- Doesn't distinguish between single-byte and double-byte characters (use LENB for that)
Pro Tips
Use to validate input length (e.g., password must be >8 characters). Combine with TRIM to get length without extra spaces. Helpful for extracting portions of text with RIGHT/LEFT/MID.
Need help with this formula?
Our AI Formula Generator can write this for you instantly.
Try AI Formula Generator →