Excel Count Characters in Cell: Formulas That Actually Work
If you need to count characters in Excel, start with =LEN(A2). Enter it in another cell and press Enter. It returns the length of the text in A2, including spaces and punctuation.
Disclosure: This page contains affiliate links. If you buy through them, we may earn a commission at no extra cost to you.
Quick answer
Choose the formula for what you need to measure:
| Task | Formula |
|---|---|
| All characters in one cell | =LEN(A2) |
| Characters without ordinary spaces | =LEN(SUBSTITUTE(A2," ","")) |
| Occurrences of lowercase a | =LEN(A2)-LEN(SUBSTITUTE(A2,"a","")) |
| Total characters in a range | =SUMPRODUCT(LEN(A2:A10)) |
These examples use English function names and comma separators. Your Excel language or regional settings may require localized names or semicolons.

Shorten spreadsheet copy faster with QuillBot
Paraphrase, summarize, and polish text after you find over-limit cells in Excel.
Try QuillBotHow to count characters without spaces
Use =LEN(SUBSTITUTE(A2," ","")). The first quoted argument contains one ordinary space; the second contains no characters. SUBSTITUTE removes those spaces before LEN counts the remaining text. It does not change A2.
For example, Hello world! has 12 characters. The formula without spaces returns 11. Tabs, line breaks, and nonbreaking spaces are not removed by this formula.
How to count a specific character
Use =LEN(A2)-LEN(SUBSTITUTE(A2,"a","")) to count lowercase a. It subtracts the length after removing a from the original length. With banana in A2, the result is 3. SUBSTITUTE is case-sensitive, so uppercase A is not included.
For an ordinary space count, use =LEN(A2)-LEN(SUBSTITUTE(A2," ","")). Omitting SUBSTITUTE’s optional occurrence argument replaces every match. See Microsoft’s SUBSTITUTE documentation.
Count rows or total a range
To see a count beside each row, put =LEN(A2) in B2 and fill down. To get one combined total, use =SUMPRODUCT(LEN(A2:A10)). This adds cell lengths without adding spaces or separators between cells. For a full workflow, see Excel character counts for ranges and limits.
Why a count may differ from what you see
Leading and trailing spaces count. So do line breaks in the stored text. Compare the actual cell contents before removing anything. Some emoji contain several Unicode characters; Excel’s treatment of surrogate pairs also depends on the workbook’s compatibility version. A visible symbol is not always a single counted character.
Microsoft explains these details in its LEN documentation. Always check the final text in the destination field when enforcing a platform limit.