Introduction
A COUNTIF function counts the number of cells within a range that meet the given criteria.

Objectives : COUNTIF Function
By the end of this page you will be able to:
 Describe the purpose of an Excel COUNTIF function
 Add a COUNTIF Function to a worksheet

Example
Excel 2007: COUNTIF Function examples
Example :Click here to download vmvXL07_Eg01.xls.
Activity

Display how many students get a specified grade
 Enter student names and grades
 Name the range (B4:C12) grades, by
 Click in the cell reference area (top left) , type grades, then [Enter]
 Enter the totals column (totals, A,B,C)
 Formula for D14: Using actual cell references
 Click fx in formula bar, under statistical category choose CountIf
 In range enter C4:C12, Criteria enter A
 Formula for D15: Using named range "grades"
 As for 4 except when you get to the Range press [F3] to display
 named ranges and choose "grades"
 Formula for D16: Using sheet references
 As for 5 except enter the criteria as the cell reference C16
 Create a pie chart of the grades (C14:D16)
Of course you can always type in the formula directly without the Excel formula wizard.
