While there is no direct word counter tool in Google Sheets you can easily get it by combining a few functions.
Although using a formula to get the word count is not as convenient as the in-built feature in Google Docs, the formulas are pretty straight forward and even allow a lot of customization (examples covered later in this tutorial)
In this tutorial, I will show you how to count the total number of words in a cell using a formula, and some variations of getting the word in specific situations. Read on to learn how to word count in Gogole Sheets.
Table of Contents
Get the Google Sheets Word Count for Each Cell
Suppose you have a dataset as shown below and you want to get the word count in each cell.
The following formula will give you the word count:
The above formula uses the SPLIT function, which separates the text string based on the delimiter.
In this formula, my delimiter is a space character, so the SPLIT function would give me an array of text string delimited by the space character. The COUNTA function then simply counts the total number of these delimited values.
And the reason I have used the IF formula is to ensure I get a blank when there is no text in the cell. If you don’t use the IF function, the formula will return 1 even when the cell is empty.
This, in turn, gives us the word count.
Note that this formula works even if you have any leading, trailing, of double spaces in between the words.
Related Content: Spell Check Google Sheets
Get Google Sheets to Count Words in an Entire Column
You can also extend the above formula to give you the word count of all the text in an entire column.
The below formula would do this.
It’s almost the same formula where I have added the SUM formula and changed the range is the SPLIT part to include a range instead of a single cell.
And since I am playing with a range of cells, you need to use ARRAYFORMULA to make sure it gives the right result.
Note that you don’t need to stick to just one column to use this formula. you can use a range of cells that can span rows and columns (but it needs to be contiguous).
How to Count Words in Google Sheets With/Without Specific Words
Google Sheets can count specific words or ignore them in a word count. Since the SPLIT function has made it so easy to quickly split a sentence into words, we can further enhance it to give us the count of specific words in a sentence.
For example, suppose you have the following data set, and you want to find the occurrence of the word THE in each cell.
Here’s how to count specific words in Google Sheets:
The above formula uses a similar SPLIT function to get a list of each word (that is separated by a space character). And with this set of words, I have used the COUNTIF function to only count the words that match the criteria word – which is ‘the
The same logic can apply when you want to find the word count while excluding a specific word or text string.
The below formula would give you the word count of the words in each cell while ignoring the word ‘THE’
How to Check the Word Count In Google Sheets When Words Are of a Specific Length
In case you want to get the word count of only those words which are above a specific character length, you can do that as well with formulas in Google Sheets.
Suppose you have the below data set and you want to get the word count of words that are at least four characters long.
The below formula will do this:
The above formula uses the SPLIT function to get all the words separated by a space character. The LEN function then finds out the length of each word.
This array of numbers (which is the length of each word) is used with the COUNTIF function, and it only counts those elements where the value is greater than three (as this is what we have specified as the criteria in COUNTIF).
Related Content: How to Search in Google Sheets
Count the Number of Lines in a Text in a Cell
We can also extend the same logic and use the SPLIT function to even count the number of line breaks in a text string in Google Sheets.
Suppose you have a dataset as shown below and you want to count how many lines are there in each cell. Since these lines are separated by a line break, what we need is to count the number of line breaks.
The below formula will give us the line count in each cell:
The above formula uses CHAR(10) as the criteria. CHAR(10) returns the line feed character which is inserted when you insert a line break in Google Sheets.
This formula can be useful when you get inconsistent data and you want to make sure everything is correct. For example, in this example, while all the address is in the same format, these have inconsistent line breaks, and you can use the above formula to make sure you spot the ones with more/fewer line breaks.
Counting Words for a Range
You can count the cells in a range by using the following formula:
=COUNTA(SPLIT(TEXTJOIN(” “, true, RANGE), ” “))
Just replace the RANGE argument with the range you wish to count for example if you wanted to count cells it would look like this:
=COUNTA(SPLIT(TEXTJOIN(” “, true, B2:C15), ” “))
Online Tool to Get the Word Count
While you can use the above-covered formulas to get the word count, you may not want to insert a column and use the formula if you only have to do it once in a while.
In such cases, you can use many of the online word counter available – such as this one.
All you need to do is copy and paste the text in the box and it will instantly give you the number of words and the number of characters in the text.
Pro Tip: You can also use Google Docs to quickly get the word count. Just copy and paste the text in any blank Google Docs document and use the keyboard shortcut Control + Shift + C (press all together) to get the word and character count.
Word Count Google Sheets FAQ
How Do You Do Word Count In Google Sheets?
You can get the word count for each cell with the following formula:
Just replace A2 with whichever cell you wish to perform a word count on.
Can Google Sheets Count Text?
There is no direct tool, but there are plenty of formulas that can count text.
How Do I Count Letters in Google Sheets?
You can use the LEN function to count letters in Google Sheets. Just type =LEN(text) the text agreement can be a cell reference.
Now that you’ve learned how to word count in Google Sheets, you may also like the following tutorials: