Function COUNTIF

A basic task with Excel is to count the number of rows for a specific criteria. The function COUNTIF do that easily 😃

Don't use the filters

Most of the Excel users, use the filter to count the rows.

But this solution is really not convenient when you have to repeat this action for many values.

Filter header

The solution is to use COUNTIF or COUNTIFS

Presentation of COUNTIF

The function COUNTIF counts the number of rows for one criteria.

The function requires only two arguments

  • The range of cells where is your data
  • The value you search (the criterion).

=COUNTIF(Range of cells, criteria of selection)

Example with COUNTIF

In the following document, you have a list of sales.


You want to know how many times you have sold Banana.

To return the number of time you have the name Banana in your list, you have to write the formula like this


And the result is

Replace the criteria by a cell reference

Now if instead of typing the name of the data you want to have the reference of a cell where its value = the name you want

For instance, you can use the cell G4 where its value is Banana


Not sensitive case

Don't worry if your criteria hasn't the same case of the data in your table, the function COUNTIF, is not sensitive case.

For instance, in this example, we want to count the number of times we have the word PEACH in uppercase and the result is

More than one criteria

If you need to count rows with more than one criteria you must use function COUNTIFS

It isn't more complex but you just have to write more arguments 😉

Related posts

Permanent link to this article:


    • dr.strange on 06/03/2018 at 04:28
    • Reply

    i was expecting a quiz

    • Jean on 09/01/2018 at 19:15
    • Reply

    I really appreciate your practice exercises, they have been very helpful. I teach seniors how to use both Word/Excel and you exercises have been good.

    Jean Brown
    Dr. Piper Center


    1. Thanks
      And share the links of the website during your training

Leave a Reply

Your email address will not be published.