COUNTIF
The COUNTIF function in Google Sheets is a powerful tool to return a conditional count across a range. Whether you're counting the number of students who scored above a certain grade, tracking the number of sales exceeding a target, or identifying the number of days with rainfall above a specific threshold, the COUNTIF function simplifies the task. Dive into our comprehensive guide to master its application.
Function Syntax and Parameters
Syntax: COUNTIF(range, criterion)
Parameters:
range: The range of cells to evaluate.criterion: The condition or criteria to meet for counting.
Step-by-Step Tutorial
-
Using
COUNTIFfor a single criterion:- Example:
=COUNTIF(A1:A5, ">5") - Result: Returns the count of cells in range
A1:A5that are greater than 5.
- Example:
-
Using
COUNTIFfor multiple criteria:- Example:
=COUNTIF(A1:A5, ">5", B1:B5, "<10") - Result: Returns the count of cells in range
A1:A5that are greater than 5 and in rangeB1:B5that are less than 10.
- Example:
Use Cases and Scenarios
- Grading System: Count the number of students who scored above a certain grade.
- Sales Analysis: Track the number of sales exceeding a target amount.
- Weather Data: Identify the number of days with rainfall above a specific threshold.
Related Functions
SUMIF: Returns the sum of a range depending on user-defined criteria.AVERAGEIF: Returns the average of a range based on specified criteria.