Skip to main content

How to count the number of times a character / word appears in an Excel cell?

Author Xiaoyang Last modified

In this article, I will explain how to count the number of times a specific character or word appears in a cell within a worksheet. For instance, if a cell contains the text “Kutools for Outlook and Kutools for Word,” you can calculate how many times the letter “o” appears using simple formulas. Additionally, explore how the Kutools for Excel add-in simplifies this process with just a few clicks.

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

Count the number of times a character or word appears with Kutools for Excel


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

To count the number of occurrences of a word or 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")

A screenshot demonstrating how to count a word's occurrences in a cell using a formula in Excel

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")

A screenshot showing a formula to count the occurrences of a specific character in a cell

3. This formula is case sensitive.

4. To count the number of times a specific word or character appears without case sensitivity, please apply the following formula:

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

A screenshot illustrating a case-insensitive formula to count occurrences of a word in a cell


Count the number of times a character or word appears with Kutools for Excel

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.

Kutools for Excel offers over 300 advanced features to streamline complex tasks, boosting creativity and efficiency. Itegarate with AI capabilities, Kutools automates tasks with precision, making data management effortless. Detailed information of Kutools for Excel...         Free trial...

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:

A screenshot of the Kutools for Excel 'Count the number of a word' option in Excel ribbon

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 you want to count in the Word text box, see screenshot:

A screenshot of the Formulas Helper dialog box in Kutools for Excel for counting a word's occurrences

4. Then click OK to close the dialog, and you will get the correct result as you want.

A screenshot showing the result of counting a word's occurrences using Kutools

Note: This feature is case sensitive.

Kutools for Excel - Supercharge Excel with over 300 essential tools. Enjoy permanently free AI features! Get It 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
Use Kutools in your preferred language – supports English, Spanish, German, French, Chinese, and 40+ others!

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


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!