How to use Countif Function in Microsoft Excel 2010

In this article we will learn about how and where we can use the Countif function in Microsoft Excel.

Consider a scenario in which we are required to count the data based on specific criteria in multiple columns.

Let’s take an example:

    • Column A has some data like Pen, Pencil, etc.
    • The regions are given in column B:E i.e. North, East, West, South as shown in the below picture.


  • We need to count the data based on a single criteria in multiple columns.
  • Criteria is to count the item which costs more than $ 5
  • In cell F2 we need to count the number of items which are more than $5.
  • To get the result,the formula in cell F2 will be=COUNTIF(B2:E2,">5").
  • Copy the formula to cells F3:F10.
  • This is how our output will look like -


Countif: Counts the number of cells within a range that meet the given condition.

Syntax =COUNTIF(range,criteria)

Let us take another example:

    • Now we want to find out the number of stationery items which costs exactly $ 5


    • To calculate the number of items costs $ 5 we will use the Countif Function
    • We will enter the formula in cell F2=COUNTIF(B2:E2,5)
    • We will get the desired result below


  • Copy the formula from cell F2 to range F3:F10.
  • The result we get are 3 i.e. Sharpener & Pencils cost $ 5.

Leave a Reply

Your email address will not be published. Required fields are marked *

Terms and Conditions of use

The applications/code on this site are distributed as is and without warranties or liability. In no event shall the owner of the copyrights, or the authors of the applications/code be liable for any loss of profit, any problems or any damage resulting from the use or evaluation of the applications/code.

Visit Us On TwitterVisit Us On FacebookVisit Us On Youtube