<< Go back to all functions

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

  1. Using COUNTIF for a single criterion:

    • Example: =COUNTIF(A1:A5, ">5")
    • Result: Returns the count of cells in range A1:A5 that are greater than 5.
  2. Using COUNTIF for multiple criteria:

    • Example: =COUNTIF(A1:A5, ">5", B1:B5, "<10")
    • Result: Returns the count of cells in range A1:A5 that are greater than 5 and in range B1:B5 that are less than 10.

Use Cases and Scenarios

  1. Grading System: Count the number of students who scored above a certain grade.
  2. Sales Analysis: Track the number of sales exceeding a target amount.
  3. 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.

Related Articles