Tip: Other languages are Google-Translated. You can visit the English version of this link.
Log in
x
or
x
x
Register
x

or

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.

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

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


Count the number of times a character or word appears in a cell or a range:

doc-count-character-appears-6 6


arrow blue right bubble Count the number of times a character or word appears with formula


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:

doc-count-character-appears-1 1

Notes:

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:

doc-count-character-appears-2 2

2. This formula is case sensitive.


arrow blue right bubble 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 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:

doc-count-character-appears-3 3

3. And in the popped out Formula Helper dialog box, click doc-count-character-appears-5 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:

doc-count-character-appears-4 4

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

doc-count-character-appears-5 5

Note: This feature is case sensitive.

Click to know more about this feature.

Free Download Kutools for Excel Now


Related articles:

How to count the number of spaces of text string in Excel?

How to count the number of words in a cell or a range cells in Excel?



Recommended Productivity Tools for Excel

Kutools for Excel Helps You Always Finish Work Ahead of Time, and Stand Out From Crowd

  • More than 300 powerful advanced features, designed for 1500 work scenarios, increasing productivity by 70%, give you more time to take care of family and enjoy life.
  • No longer need memorizing formulas and VBA codes, give your brain a rest from now on.
  • Become an Excel expert in 3 minutes, Complicated and repeated operations can be done in seconds, 
  • Reduce thousands of keyboard & mouse operations every day, say goodbye to occupational diseases now.
  • 110,000 highly effective people and 300+ world-renowned companies' choice.
  • 60-day full features free trial. 60-day money back guarantees. 2 years of free upgrade and support.

Brings Tabbed Browsing and Editing to Microsoft Office, Far More Powerful Than The Browser's Tabs

  • Office Tab is designed for Word, Excel, PowerPoint and Other Office Applications: 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!
Say something here...
symbols left.
You are guest ( Sign Up? )
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.
  • To post as a guest, your comment is unpublished.
    Ronan K · 1 years ago
    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...
    • To post as a guest, your comment is unpublished.
      skyyang · 1 years ago
      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!