How to count occurrences of specific character in a cell in Excel?
Sometimes, you may need to count how many times a specific character appearing in a cell. As below screenshot shown, you need to count number of character “o” appearing in cell A1, how to achieve this? In this article, we will show you methods of counting occurrences of specific character in Excel.
Recommended Productivity Tools for Excel
Office Tab: Bring powerful tabs to Office (include Excel), just like Chrome, Safari, Firefox and Internet Explorer. Save you half the time, and reduce thousands of mouse clicks for you. 30-day Unlimited Free Trial
Kutools for Excel: Save 71% of your time and solve 82% Excel problems for you. 300+ advanced tools designed for 1500+ work scenario, make Excel much easy and increase productivity immediately.60-day Unlimited Free Trial
In this section, we introduce you a formula to count occurrences of specific character in a cell.
1. Select a blank cell for locating the result.
2. Type formula =SUMPRODUCT(LEN(A2)-LEN(SUBSTITUTE(A2,"o",""))) into the Formula Bar, and then press the Enter key.
1. In the formula, A1 contains the text string which you want to count occurrences of specific character from.
2. “o” is the specific character you are going to count. Please change them as you need.
Then the occurrences of character “o” is counted and listed in selected cell. See screenshot:
Note: This feature is case sensitive.
The above formula may be difficult for you to remember, here we introduce you the COUNTCHAR utility of Kutools for Excel, with this utility, you can easily count how many times a specific character appearing in a cell.
|Kutools for Excel : with more than 300 handy Excel add-ins, free to try with no limitation in 60 days.|
1. Select a blank cell for locating the result, and then click Kutools > Kutools Functions > Statistical & Math > COUNTCHAR. See screenshot:
2. In the Function Arguments dialog box, select the cell which contains the text string for counting the specific character in the Within_text box (here we select cell A2), type the character into the Find_text box (in this case, the character is “o”) that you want to count, and then click the OK button. See screenshot:
Then you will get the result in selected cell immediately.
Note: This feature is also case sensitive.