Google Sheets COUNTIFS Function

Last Updated : 14 Jan, 2026

The COUNTIFS function in Google Sheets counts the number of cells that meet multiple criteria across one or more ranges. It's an extension of COUNTIF, allowing you to apply multiple conditions, making it ideal for complex data analysis where you need to count entries that satisfy several criteria.

How It Works:

  • Evaluates multiple ranges based on different conditions.
  • Defines conditions for each range (e.g., values greater than a number).
  • Counts cells that meet all specified conditions.
  • Returns the total number of matching cells across all criteria.

COUNTIFS Function Syntax in Google Sheets:

COUNTIFS(range1, criterion1, [range2, criterion2,])
  • Range1: The first range to evaluate.
  • Criterion1: The condition for the first range.
  • Range2, Criterion2: Additional ranges and conditions (optional).

1. How to Use the COUNTIFS Function in Google Sheets

The Google Sheets COUNTIFS function is a powerful tool for counting cells based on multiple conditions. It simplifies data analysis by filtering and counting entries that meet specific criteria. Follow these steps to use it effectively:

Step 1: Select a Cell for the Result

Click on the cell where you want the result to appear (e.g., C2).

Google Sheets COUNTIFS Function
Select a Cell for the Result

Step 2: Enter the COUNTIFS Formula

In the selected cell (e.g., C2), type the formula:

=COUNTIFS(A2:A9, "January", B2:B9, ">100")

Explanation:

  • A2:A9 refers to the range of months.
  • "January" is the first condition (the month must be January).
  • B2:B9 refers to the range of sales values.
  • ">100" is the second condition (the sales must be greater than 100).
Google Sheets COUNTIFS Function
Enter the COUNTIFS Formula

Step 3: Press Enter

After typing the formula, press Enter.

Google Sheets COUNTIFS Function
Press Enter

The result will show the count of sales greater than 100 in January (in this case, the count will be 3).

2. Advanced Use Cases and Examples for COUNTIFS Function

The COUNTIFS function in Excel or Google Sheets allows you to count cells that meet multiple criteria, making it a powerful tool for advanced data analysis. Here are detailed, real-world applications of the COUNTIFS function:

1. Tracking Attendance

Scenario: You need to count how many employees were present on a specific date.

Formula Example:

=COUNTIFS(Dates!A2:A100, "01/10/2023", Attendance!B2:B100, "Present")

Explanation:

  • Dates!A2:A100: The range containing attendance dates.
  • "01/10/2023": The specific date to filter.
  • Attendance!B2:B100: The range containing attendance statuses (e.g., "Present," "Absent").
  • "Present": The criterion to count only "Present" entries.

Use Case: Track employee participation during a meeting or daily attendance for compliance and reporting.

2. Inventory Management

Scenario: Identify how many products in a specific category are below the stock threshold.

Formula Example:

=COUNTIFS(Category!A2:A100, "Electronics", Stock!B2:B100, "<10")

Explanation:

  • Category!A2:A100: The range containing product categories.
  • "Electronics": Filters the products belonging to the "Electronics" category.
  • Stock!B2:B100: The range containing stock levels.
  • "<10": Counts only items with stock levels below 10.

Use Case: Manage inventory by identifying low-stock items for reordering to avoid stockouts.

3. Sales Performance Analysis

Scenario: Determine how many sales transactions exceeded $500 in a specific region.

Formula Example:

=COUNTIFS(Sales!A2:A100, ">500", Region!B2:B100, "North")

Explanation:

  • Sales!A2:A100: The range containing sales amounts.
  • ">500": Filters transactions where the sales amount exceeded $500.
  • Region!B2:B100: The range containing regional data.
  • "North": Counts only sales in the "North" region.

Use Case: Evaluate regional sales performance and identify high-value markets for targeted strategies.

3. Using Wildcards and Date-Based Conditions with COUNTIFS

The COUNTIFS function in Google Sheets and Excel becomes even more versatile when used with wildcards and date-based conditions. Here’s a detailed explanation with examples:

1. Wildcard Examples

Wildcards allow you to perform partial or flexible text matching in your dataset.

A. Using * for Any Number of Characters

  • The * wildcard represents zero or more characters, making it ideal for finding text that contains a specific word or phrase.

Example:

=COUNTIFS(A2:A100, "*John*")
  • What it Does: Counts cells in range A2:A100 where the text contains "John" (e.g., "John Doe," "Johnny," or "Hello John").
  • Use Case: Filter names, keywords, or phrases in large datasets.

B. Using ? for a Single Character

The ? wildcard represents exactly one character, making it useful for slight variations in spelling or formatting.

Example:

=COUNTIFS(A2:A100, "J?hn")
  • What it Does: Counts cells in range A2:A100 with text matching variations like "John" or "Jahn."
  • Use Case: Handle datasets with typographical errors or alternate spellings.

2. Date-Based Examples

Using COUNTIFS with dates helps filter data within specific timeframes or relative to particular dates.

A. Counting Entries Within a Specific Date Range

  • Use comparison operators (>=, <=) to define start and end dates.

Example:

=COUNTIFS(Date!A2:A100, ">=01/01/2023", Date!A2:A100, "<=12/31/2023")
  • What it Does: Counts rows in Date!A2:A100 where the date falls between January 1, 2023, and December 31, 2023.
  • Use Case: Summarize events, sales, or activities within a year or custom period.

B. Counting Entries Before or After a Specific Date

  • Use < or > to set open-ended date conditions.

Example:

=COUNTIFS(Date!A2:A100, "<01/01/2023")
  • What it Does: Counts rows in Date!A2:A100 with dates before January 1, 2023.
  • Use Case: Identify historical data or upcoming deadlines.

Also Read:


Comment