Skip to main content

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 formulas to deal with this job.

Count the number of times a character or word appears with formulas

Count the number of times a character or word appears with an easy feature


Count the number of times a character or word appears with formulas

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:

Enter the below formula into a blank cell, and then press Enter key to get the number of times the character appears, see screenshot:

=(LEN(A2)-LEN(SUBSTITUTE(A2, "remove","")))/LEN("remove")

Notes:

1. In the above formula, A2 is the text cell that you want to count, the word “remove” is the specified character that you want to count its occurrences

2. 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:

=(LEN(A2)-LEN(SUBSTITUTE(A2, "o","")))/LEN("o")

3. This formula is case sensitive.

4. To count number of the specific word or charater appears without case sensitive, please apply the following formula:

=(LEN(A2)-LEN(SUBSTITUTE(UPPER(A2),UPPER("remove"),"")))/LEN("remove")


Count the number of times a character or word appears with an easy feature

If you have Kutools for Excel, you can use its Count the number of a word of Commonly-Used Formulas to count the times a certain character or a word occurs.

Note:To apply the Count the number of a word features, firstly, you should download the Kutools for Excel, and then apply the features quickly and easily.

After installing Kutools for Excel, please do as this:

1. Click a cell where you want to output the result.

2. Then click Kutools > Formula Helper > StatisticalCount the number of a word, see screenshot:

3. And in the popped out Formulas Helper dialog box, select the cell that you want to cout the specifc word or character from the Text box, and then enter the word or character that you want to count in the Word text box, 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.

Click to Download Kutools for Excel for free trial Now


More relative articles:

  • Count The Number Of Spaces Of Text String
  • Have you ever tried to count the number of spaces of text string in a cell? Of course, you can count them one by one manually, but, if there are multiple cells needed to be counted, this way will be tedious and time consuming.
  • Count The Number Of Words In A Cell Or A Range Cells
  • You can easily count the number of words in MS Word, but Excel doesn't have a built-in tool for counting the number of words in a worksheet. However, you can count the number of words in Excel with following methods.
  • Count Cells If One Of Multiple Criteria Met
  • The COUNTIF function will help us count cells containing one criteria, and the COUNTIFS function can help up count cells containing a set of conditions or criteria in Excel. What if counting cells if contain one of multiple criteria? Here I will share the ways to count cells if contain X or Y or Z … etc. in Excel.
  • Count Comma Separated Values In A Single Cell
  • If cell content is separated by comma in a single cell, such as “A1, A2, A3, A4, A5”, and you want to count the total number of comma separated values in this cell, what can you do? In this case, the total comma separated values should be 5.

Best Office Productivity Tools

🤖 Kutools AI Aide: Revolutionize data analysis based on: Intelligent Execution   |  Generate Code  |  Create Custom Formulas  |  Analyze Data and Generate Charts  |  Invoke Kutools Functions
Popular Features: Find, Highlight or Identify Duplicates   |  Delete Blank Rows   |  Combine Columns or Cells without Losing Data   |   Round without Formula ...
Super Lookup: Multiple Criteria VLookup    Multiple Value VLookup  |   VLookup Across Multiple Sheets   |   Fuzzy Lookup ....
Advanced Drop-down List: Quickly Create Drop Down List   |  Dependent Drop Down List   |  Multi-select Drop Down List ....
Column Manager: Add a Specific Number of Columns  |  Move Columns  |  Toggle Visibility Status of Hidden Columns  |  Compare Ranges & Columns ...
Featured Features: Grid Focus   |  Design View   |   Big Formula Bar    Workbook & Sheet Manager   |  Resource Library (Auto Text)   |  Date Picker   |  Combine Worksheets   |  Encrypt/Decrypt Cells    Send Emails by List   |  Super Filter   |   Special Filter (filter bold/italic/strikethrough...) ...
Top 15 Toolsets12 Text Tools (Add Text, Remove Characters, ...)   |   50+ Chart Types (Gantt Chart, ...)   |   40+ Practical Formulas (Calculate age based on birthday, ...)   |   19 Insertion Tools (Insert QR Code, Insert Picture from Path, ...)   |   12 Conversion Tools (Numbers to Words, Currency Conversion, ...)   |   7 Merge & Split Tools (Advanced Combine Rows, Split Cells, ...)   |   ... and more

Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time.  Click Here to Get The Feature You Need The Most...

Description


Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier

  • Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
  • Open and create multiple documents in new tabs of the same window, rather than in new windows.
  • Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!
Comments (2)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Hi, Is there a way to make this formula not case sensitive for the lookup value, for example, if you are searching for the word "remove" it would count all instances of remove, Remove, REMOVE etc...
This comment was minimized by the moderator on the site
Hello, Ronan,
To count the number of a specific text without case sensitive, may be the below formula can help you:
=(LEN(A2)-LEN(SUBSTITUTE(UPPER(A2),UPPER("remove"),"")))/LEN("remove")

Please try it, hope it can help you!
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations