Count the Words in a Cell
You need a word count per cell — task descriptions, survey answers, product titles — and the spreadsheet has no WORDCOUNT function.
Excel & Google Sheets
This formula works in both Excel and Google Sheets.
How it works
A cell with N words contains N−1 spaces, so counting spaces and adding 1 gives the word count. The formula measures the length of the text, then measures it again with every space removed by SUBSTITUTE — the difference is the number of spaces. TRIM is what makes it reliable on real data: it removes leading and trailing spaces and collapses runs of spaces into single ones, so "quarterly budget review" still counts as 3, not 5. Without TRIM, every stray double space inflates the count.
When to use it
Use it to enforce length rules on descriptions, spot one-word survey answers worth ignoring, or QA product titles that must stay under a word limit.
Common mistakes
Did this formula help?
Engine-verified against the sample data aboveDownload the proof sheet (.xlsx)Last reviewed 2026-07-09