Counts the number of cells in a range that meet a specified condition.
Syntax
test_range: The range in which you want to count the number of non-empty cells based on the given condition. Eg., A2:A8
condition: The condition may be:
A number, such as 15
An expression, such as 2/3 or SQRT(A1)
A text string, such as "zoho"
Remarks
The COUNTIF function is not case-sensitive i.e. APPLE and Apple are treated similar.
Examples
|
Formula |
Result |
|
=COUNTIF( A2:A8 ; "Lockers" ) |
1 |
|
=COUNTIF( B2:B8 ; ">300" ) |
4 |
Possible Errors
|
Errors |
Meaning |
|
#N/A! |
|
|
#NAME! |
|
|
#VALUE! |
|
|
#REF! |
|
Similar Functions