Microsoft Excel: Count the Number of Occurrences of a Text or Number

Posted May 31, 2013 by Vishwanath Dalvi in Microsoft Excel

If you wish to determine how many times a text or number has been repeated within a range or an entire workbook of Excel, this tech-recipe will guide you through the steps with examples.

We will start with an Excel sheet with the following records between the range of A2 to C11.

You can download the Excel file used here with examples to test it on your computer.

Using the formula listed below, we can determine the number of occurrences of a text or number or how many times a certain text or number has been repeated within an entire excel sheet.

This formula will find the text or number given as criteria and count all the results containing the search term (criteria) within a specified range.

=COUNTIF(Range, Criteria)


Example 1.1

Find the number of occurrences of the first name “Jinny” within a specified range.

=COUNTIF(A2:C11,"Jinny")
Result: 3

Example 1.2

Find the number of occurrences of the last name “Dalvi” within a specified range.

=COUNTIF(A2:C11,"Dalvi")
Result: 2

Example 1.3

Find the number of occurrences of the score 500 within a specified range.

=COUNTIF(A2:C11,500)
Result: 4

I am sure this will help you while working with Excel. If you find more ways to count the number of occurrences of an item, please feel free to post them in the comments below.

 

About Vishwanath Dalvi

Vishwanath Dalvi is a gifted engineer and tech enthusiast. He enjoys music, magic, movies, and gaming. When not hacking around or supporting the open source community, he is trying to overcome his phobia of dogs.
View more articles by Vishwanath Dalvi

The Conversation

Follow the reactions below and share your own thoughts.

  • Fred Weiner

    Vishwanath, why the single quote in front of Dalvi in the example but doubles for Jinny? Are you attempting to show that any kind of quoting works?

    • Vishwanath Dalvi

      > Thank you Fred, for pointing it out, typo fixed.