# How to count specific words in a cell or a range in Excel

This post explains that how to count the number of a specific word in a cell or a range of cells in excel. This post will guide you how to count specific words in a single cell or a range using excel formula. How to count the occurrence of a specific word in a cell or a range of cells in excel.

## Count specific words in a single cell

If you want to count the number of a specific word in a single cell, you need to use the SUBSTITUTE function to remove all that certain word in text string, then using LEN function to calculate the length of the substring that without that specific word. Then using the length value of the original text string subtract the length of the substring that without that specific word. So that you can get the length of all that specific words in a single cell. Then the result is divided by the length of that specific word, so that you can get the numbers of that word in that single cell.

Based on the above analysis, we can write down the following excel formula:

`= (LEN(B1)-LEN(SUBSTITUTE(B1,"excel",""))) / LEN("excel")` Let’s see how this formula works:

= LEN(“excel”) This formula will calculate the length of a specific word “excel”.

=LEN(SUBSTITUTE(B1,”excel”,””)) The SUBSTITUTE function will replace all “excel” substring with new_text empty string. Then the returned value goes into the LEN function to get the length of the substring that without specific words.

=(LEN(B1)-LEN(SUBSTITUTE(B1,”excel”,””))) This formula will get the length of all specific words in that cell.

## Count specific words in a range of cells

The above formula can only count the number of specific word in a single cell and how to count the number of certain word in a range of cells, you can use the SUMPRODUCT function to sum the number of certain word for each cell in a range, so you can write down the following formula:

`=SUMPRODUCT((LEN(B1:B3)-LEN(SUBSTITUTE(B1:B3,"excel",""))) / LEN("excel"))`

Let’s see how this formula works:

=(LEN(B1:B3)-LEN(SUBSTITUTE(B1:B3,”excel”,””))) / LEN(“excel”) This formula will return an array result that contains a number of certain word for each cell in a range B1:B3.the array result like this: {2;1;1} Then the returned array goes into the SUMPRODUCT function as its argument.

=SUMPRODUCT() This formula will sum all items in that array result that returned by the above formula to get the total number of certain word “excel” in the range B1:B3.

### Related Formulas

• Count the number of words in a cell
If you want to count the number of words in a single cell, you can create an excel formula based on the IF function, the LEN function, the TRIM function and the SUBSTITUTE function. ..
• Extract word that starting with a specific character
Assuming that you have a text string that contains email address in Cell B1, and if you want to extract word that begins with a specific character “@” sign, you can use a combination with the TRIM function, the LEFT function, the SUBSTITUTE function, the MID function, the FIND function, the LEN function and the REPT function to create an excel formula.…

### Related Functions

• Excel Substitute function
The Excel SUBSTITUTE function replaces a new text string for an old text string in a text string.The syntax of the SUBSTITUTE function is as below:= SUBSTITUTE  (text, old_text, new_text,[instance_num])….
• Excel SUMPRODUCT function
The Excel SUMPRODUCT function multiplies corresponding components in the given one or more arrays or ranges, and returns the sum of those products.The syntax of the SUMPRODUCT function is as below:= SUMPRODUCT (array1,[array2],…)…
• Excel LEN function
The Excel LEN function returns the length of a text string (the number of characters in a text string).The syntax of the LEN function is as below:= LEN(text)…
Related Posts

Case Sensitive Lookup with SUMPRODUCT and EXACT

Today, we will show you how to use SUMPRODUCT and EXACT to perform a case sensitive exact match. In this article, we provide a simple example to calculate bonus for employees whose names are case-sensitive. If you meet similar scenarios ...

Average per Week by Formula in Excel

We usually apply AVERAGE function or relevant functions to return average directly in Excel worksheet. But in some situations, only applying average relevant functions cannot figure out our problem. Sometimes we can create a formula with functions and mathematical operation ...

How to Sum if Equal to Many Items or A Range in Excel

If we want to sum numbers from a range with criteria, we often select SUMIF of SUMIFS functions as the first choice to create a formula. The criteria can be a number or an array or a collection of some ...

How to Sum if Equal to X or Y in Excel

In daily work, if we want to sum numbers from a range, and only sum the numbers which being equal to X or Y in the range, we can create a formula with Excel build-in functions to get the result. ...

How To Sum the Largest N Values in Excel

Sometimes we may want to sum the largest N numbers or top N numbers in a range. In this article, we will show you the method of “SUM the Largest N Numbers” by a simple formula which consist of SUMPRODUCT ...

How to Sum for Cell Contains Formula Only in Excel

Sometimes values are created by formulas in cells. If we want to sum values which are created by formulas from a range, but some values which are hardcoded also list in the same range, how can we filter out matched ...

How to Sum the Smallest N Values in Excel

Sometimes we may want to sum the first smallest N numbers in a range in Excel. In this article, we will show you the method of “SUM the Smallest N Numbers” by a simple formula which consist of SUMPRODUCT and ...

How to Sum by SUMPRDUCT with One Specific Criteria Multiple Columns in Excel

Sometimes we may meet the case that to sum numbers based on one specific criteria. In this article, we will show you the method to resolve this problem by formula with the help of Excel SUMPRODUCT function. SUMPRODUCT can filter ...

How to Sum by SUMPRDUCT with Specific Criteria in Excel

Sometimes we may meet the case that to sum numbers based on two or more specific criteria. In this article, we will show you the method to resolve this problem by formulas with the help of Excel SUMPRODUCT function. SUMPRODUCT ...

How to Count Unique Numeric Values in a Range in Excel

This post will guide you how to count unique numeric values in the given range in Excel 2013/2016 or Excel office 365. How do I count the unique numeric values in a list of data with some duplicate values using ...

Sidebar