# Count Cells Greater Than Set Amount With Excel COUNTIF Function

One of the tasks you have to do quite often in Excel is to count things. For example, you could have a list of students and their test scores.

If the passing score is 50, how can you get Excel to count the number of students who passed the test?

### Use COUNTIF and an Operator

The Excel COUNTIF function will count cells, based on the criteria that you enter. As part of the criteria, you can use an operator, such as greater than, or less than, to count a specific range of numbers.

In this example, the passing score is 50. To find the students who failed the test, you’d count the scores that are less than 50 — <50.

To include this operator in the COUNTIF criteria, enclose the operator and number in double quote marks.

=COUNTIF(B2:B11,”<50″)

### Use a Cell Reference with COUNTIF Criteria

Instead of typing a number in the COUNTIF criteria, you can use a cell reference. In this example, cell F5 contains the passing score.

To find the students who passed the test, you’d count the scores that are greater than or equal to the value in cell F5 — >=F5.

To include a cell reference and operator in the COUNTIF criteria, enclose the operator in double quote marks, and use an ampersand before the cell reference.

=COUNTIF(B2:B11,”>=” & F5)