How to count the number of times a character / word appears in a cell?
This article, I will talk about how to count the number of times a specific character or a word appears in a cell in a worksheet. For example, A2 contains the text “Kutools for outlook and Kutools for word”, and now, I want to know the number of the letter “o” in this cell. In Excel, we can apply formula to deal with this job.
To count the number of occurrences of a wordor a character in a cell, you can use the formula which combines SUBSTITUTE and LEN functions. Please do as follows:
1. Enter this formula into a blank cell: =(LEN(A2)-LEN(SUBSTITUTE(A2, "remove","")))/LEN("remove"), (A2 is the text cell that you want to count, the word “remove” is the specified character that you want to count its occurrences), and then press Enter key to get the number of times the character appears, see screenshot:
1. With above formula, you can also count the number of a specific character appears in a cell, you just need to change the word "remove" to the character as you want, see the following screenshot:
2. This formula is case sensitive.
If you have Kutools for Excel, you can use its Count times a word appears of Commonly-Used Formulas to count the times a certain character or a word occurs.
|Kutools for Excel : with more than 300 handy Excel add-ins, free to try with no limitation in 60 days.|
After installing Kutools for Excel, please do as follows:（ Free Download Kutools for Excel Now ）
1. Click a cell where you want to put the result.
2. Then click Kutools > Formulas > Count times a word appears, see screenshot:
3. And in the popped out Formula Helper dialog box, click button to select the cell that you want to cout the specifc word or character from the Text box, and then enter the word “remove” or character that you want to count in the Word text box, and the word in the box should be surrounded with quotation marks, see screenshot:
4. Then click OK to close the dialog, and you will get the correct result as you want.
Note: This feature is case sensitive.