Count Words in a Cell of Excel
There is no in-built excel formula to find the Word Count and therefore, it needs to be entered manually. You can make use of the formula below to calculate wordcount in excel –
Let us understand the working of this formula.
To begin with, we utilize the SUBSTITUTE function to evacuate and displace all spaces in the cell with a vacant content string (“). The LEN functionLEN FunctionThe Len function returns the length of a given string. It calculates the number of characters in a given string as input. It is a text function in Excel as well as an inbuilt function that can be accessed by typing =LEN( and entering a string as input. restores the length of the string without spaces.
Next, we subtract the string length without spaces from the absolute length of the string. The number of words in a cell is equivalent to the number of spaces plus 1. So, we add 1 to the word count.
Further, we utilize the TRIM function to remove extra spaces in a cell. A worksheet may contain a lot of imperceptible spaces. Such coincidental occurrence might be towards the start or end of the text (leading and trailing spaces). Since extra spaces return an incorrect word count, the TRIM function is used before computing the length of the string.
The steps to count the total number of words in a cell of Excel are listed as follows:
- Step 1: Select the cell in the Excel sheet where you want the result to appear.
- Step 2: For counting the number of words in cell A1, enter the formula shown in the following image.
- Step 3: Click “Enter” and the exact number of words appear in cell B1.
How to Count the Total Number of Words in a Range of Cells?
To count the number of words in a range of cells, apply the equation that counts the words in a cell and implant it either inside the SUM or the SUMPRODUCT function.
The formula to count words of a particular range is “=LEN(TRIM(cell))-LEN(SUBSTITUTE(cell,” “,””))+1.”
- Step 1: Select the range of data whose words you wish to count.
- Step 2: Enter the formula in the cell where you want the result to display as shown in the succeeding image.
- Step 3: Click “Enter” and the result appears in cell B1.
- Step 4: Drag the fill handle to all cells to get the word count of each cell in Excel.
How to Count Specific Words in a Range?
To count the number of times a specific word appears in a range of cells, we utilize a comparative methodology. We count the explicit words in a cell and consolidate it with the SUM or SUMPRODUCT functionSUMPRODUCT FunctionThe SUMPRODUCT function in excel is used to multiply the array or range and provide the sum of a product. It is to calculate a weighted average. SUMPRODUCT formula is used to calculate the sum of corresponding numbers product in one or more ranges/arrays..
- Step 1: Select the cell and enter the formula “=(LEN(cell)-LEN(SUBSTITUTE(cell,word,””)))/LEN(word)” as shown in the following image.
- Step 2: Click “Enter” to see the word count in cell A14. The formula we used above helps us know the number of times the word “February” is present in cell A2.
The result in cell A14 is 4.
Frequently Asked Questions
The formula to count the occurrence of a single character in a cell is stated as follows:
The “cell_ref” stands for cell reference. The letter “a” stands for the character that the user wants to count.
The formula to count the occurrence of a single character in a range of cells is stated as follows:
The “range” stands for the range of cells to which the formula is applied. The letter “a” stands for the character that the user wants to count.
The steps to count the number of times a particular word appears in a row or a column are listed as follows:
1- Select the row or the column in which the word is to be counted. The row is selected by clicking the number on the left-hand side. The column is selected by clicking the letter that appears on top of the column.
2 – In the formula tab, click “Define Name” and enter a name for the row or the column in the “New Name” box.
3 – If the column is named “NamesColumn,” the cells in this column will use “NamesColumn” for reference.
4 – Apply the formula “=COUNTIF(NamesColumn,”Jack”)” to count the number of times “Jack” appears in the “NamesColumn.”
Note: Every time a new name is added to a cell of “NamesColumn,” the result of the formula will automatically update.
- The formula to count words of a particular range is “=LEN(TRIM(cell))-LEN(SUBSTITUTE(cell,” “,””))+1.”
- The word count formula is combined with the SUM or SUMPRODUCT function to handle arrays.
- The SUBSTITUTE function replaces all the spaces of the cell with a vacant content string (“).
- The LEN function restores the length of the string without spaces.
- The TRIM function removes the leading and trailing spaces found at the beginning or at the end of the text.
- The number of words in a cell is equivalent to the number of spaces plus 1.
This has been a guide to Word Count in Excel. Here we discuss how to count the total number of words in a cell and an excel range along with practical examples and a downloadable template. You may learn more about Excel from the following articles –
- Count Rows in Excel | Examples
- Count Colored Cells In Excel
- Excel Count Formula
- How to Count Unique Values in Excel?
- Compare Two Lists in Excel