How to use the COUNTIF function to count values in Excel
In this example, we will be using the COUNTIF function to count specific values in a worksheet. We will be using a price list and will try to determine how many products in the price list cost more than $500. The COUNTIF function will count the number of cells in a range that meet this specified criteria. The syntax used for this function is: COUNTIF(range, criteria)
Range: The range of cells.
Criteria: The criteria that specifies which cells to count. This can be a number, expression, or text.
How to Use COUNTIF to Count specified values:
- In cells A2:A11 enter the different product names.
- Enter the costs of each product in the adjacent cells B2:B11.
- In cell C2 enter 500 as the given criteria.
- Select cell D2 and type the following formula: =COUNTIF(B2:B11,”>” & C1).
- Press Enter.
With a basic understanding of this formula, you should be able to use this in many other applications.
- Use the COUNT function to count cells containing numeric data
- Calculate attendance figure in Excel using the COUNTIF function
- How to Use the COUNTBLANK function to count empty cells
- How to Use the COUNTA function to count cells containing data
- How to Use the SUBTOTAL function to count rows in filtered lists
