Table of Contents
The ability to integrate conditional logic into spreadsheet operations is absolutely fundamental for robust data analysis and reporting. Within Google Sheets, specialized functions like COUNTIF and COUNTIFS empower users to precisely quantify data by counting values in one column only if corresponding values in another column satisfy specific criteria. Mastering these conditional counting techniques moves analysis beyond simple aggregation, allowing analysts to extract highly targeted and meaningful insights from large or complex datasets.
This expert guide provides a comprehensive examination of both the single-criterion COUNTIF function and the powerful, multi-criterion COUNTIFS function. We will walk through practical applications using a standard sample dataset, providing the exact syntax required to execute accurate and reliable conditional counts for various analytical needs.
Distinguishing Between COUNTIF and COUNTIFS
Before implementing these functions, it is crucial to understand the architectural differences that dictate their appropriate use. The COUNTIF function is designed specifically for efficiency in straightforward tasks. Its primary purpose is to evaluate a single range against a single condition. The syntax is minimal, making it the ideal choice when your counting requirement depends on meeting just one test.
In contrast, the COUNTIFS function is engineered for complexity and scale. This function enables the simultaneous evaluation of multiple ranges against multiple corresponding criteria. For a data row to be included in the final count when using COUNTIFS, it must satisfy the requirements of the first criterion, AND the second criterion, AND every subsequent criterion defined in the formula. This logical AND structure is indispensable for advanced data filtering, such as counting records that match a specific department AND exceed a minimum sales threshold.
Although COUNTIFS is capable of handling a single criterion (which technically renders COUNTIF redundant), established best practice encourages using the simpler COUNTIF when only one condition is necessary. Reserving COUNTIFS exclusively for tasks involving two or more conditional tests ensures formulas remain clean, readable, and easier to maintain.
Preparing the Sample Data for Analysis
To effectively demonstrate these conditional counting methodologies, we will use a small, organized dataset focused on fictional player statistics. This sample structure includes three essential columns: Player Name, Team Designation, and Points Scored. All subsequent formula examples will directly reference this layout, which spans from row 2 through row 11.
The visual representation below illustrates the data structure we will be analyzing within Google Sheets. Pay close attention to the column headers and the data ranges, as these are critical for defining our formula arguments:

With our dataset clearly defined, we can now proceed to the specific examples that demonstrate the practical implementation of both conditional counting functions, beginning with the most basic scenario.
Example 1: Executing a Single Condition Count (COUNTIF)
Our initial objective is to determine the total number of players associated with a particular team. Specifically, we want to count the rows where the entry in the Team column is exactly equal to “Mavs”. Since this task involves checking only one condition (Team equals “Mavs”), the ideal tool is the straightforward COUNTIF function.
The syntax for COUNTIF requires two distinct arguments: the specific range that needs to be evaluated, and the criteria that must be met within that range. For this example, the range is the Team column (A2:A11). We will dynamically reference the criterion by assuming the target value “Mavs” is stored in cell F1, which allows for easy modification without altering the core formula.
We input the following formula into cell F2 to execute this single-criterion conditional count:
=COUNTIF(A2:A11, F1)
This formula instructs Google Sheets to systematically check every cell from A2 through A11. If a cell’s content matches the specified criterion found in cell F1, that row is counted. The resulting output represents the total number of players designated as “Mavs.”
The screenshot below clearly demonstrates the function’s implementation and the resulting output in the spreadsheet:

As the visual output confirms, there are 4 entries in the dataset that meet the “Mavs” criterion. This simple scenario validates the utility of conditional counting for filtering and basic summarization tasks.
Example 2: Implementing Multiple Conditions (COUNTIFS)
When analytical requirements demand more precise filtering—where a data row must satisfy two or more conditions simultaneously—the COUNTIFS function becomes necessary. In this advanced example, our goal is to count the players who belong to the “Mavs” team and who have scored a total of more than 20 points. This requires evaluating two distinct columns (Team and Points) against two separate, intersecting criteria.
The structure of the COUNTIFS function requires defining criteria pairs: first the range, followed immediately by its condition. We must define the range for the team column (A2:A11) and its criterion (F1), and subsequently define the range for the points column (C2:C11) and its criterion (a value greater than 20).
A crucial technical consideration when utilizing comparative operators (such as greater than or less than) is syntax handling. The operator (e.g., “>”) must be enclosed in double quotes. Furthermore, if the comparison value itself is dynamic (referenced from another cell, F2 in this case), it must be combined with the operator using the ampersand operator (&). This concatenation ensures the formula correctly interprets the full comparison statement.
We input the following formula into cell F3 to execute this complex, dual-criterion count:
=COUNTIFS(A2:A11, F1, C2:C11, ">"&F2)
In this construction, the first criteria pair (A2:A11, F1) filters for the “Mavs” team. The second pair (C2:C11, ">"&F2) ensures that the corresponding value in the Points column is numerically greater than the value held in cell F2 (which is 20). Only rows that satisfy both conditions simultaneously are included in the final aggregated count.
The result of this highly specific data segmentation is visualized in the output below:

This powerful example confirms how COUNTIFS enables highly granular segmentation, allowing analysts to intersect conditions across numerous columns to achieve highly specific results. It is worth noting that COUNTIFS provides immense scalability, capable of handling up to 127 criteria pairs for extremely complex data requirements.
Advanced Criteria Techniques and Best Practices
While the previous examples focused on straightforward exact text matching and simple numerical comparisons, the true flexibility of COUNTIF and COUNTIFS becomes apparent when handling more complex types of criteria. These include using textual wildcards, processing date ranges, and executing non-equality tests. Proficiency in these advanced techniques is necessary for comprehensive spreadsheet manipulation.
Using Wildcard Characters: To perform partial text matches, Google Sheets supports specific wildcard characters. The question mark (
?) represents any single character, while the asterisk (*) matches any sequence of zero or more characters. For instance, to count all records associated with teams whose names begin with “Ma”, the required criterion string would be"Ma*".Handling Date Criteria: When setting up counts based on specific dates or date ranges, the criterion must be formatted correctly and often requires dynamic referencing. For example, to count entries that occurred strictly before January 1, 2024, the criterion should be formatted as
"<"&DATE(2024,1,1). This ensures the comparison operator is properly concatenated with the calculated date value.Counting Blanks and Non-Blanks: To count cells that are completely blank within the defined range, the criterion is simply two double quotes (
"", representing an empty string). Conversely, to count cells that contain any data (i.e., cells that are not blank), the criterion used is"<>"(meaning not equal to nothing).
A non-negotiable best practice when employing COUNTIFS is ensuring absolute consistency in range dimensions. If the initial range defined is A2:A11 (10 rows), all subsequent ranges (e.g., C2:C11) must also cover exactly 10 corresponding rows. Range mismatches will invariably lead to a #VALUE! error. Moreover, analysts should consistently reference criteria dynamically from separate cells (F1, F2, etc.) rather than embedding hardcoded values within the formula string. This approach drastically improves formula transparency, simplifies future updates, and minimizes the risk of human error.
Note #1: As previously highlighted, the COUNTIFS function is highly scalable. While our demonstration utilized only two columns, the function allows you the flexibility to expand this conditional counting process to include as many columns and corresponding criteria as your complex analysis requires, up to the function’s documented maximum limit of 127 pairs.
Note #2: For comprehensive technical specifications, detailed handling of specific data types, and a full explanation of syntax and limitations for all conditional counting functions, users are strongly advised to consult the official Google Sheets documentation published by Google.
Conclusion and Resources for Further Learning
Conditional counting stands as a fundamental competency in modern spreadsheet data manipulation. By strategically deploying COUNTIF for simple, single-condition tests and utilizing COUNTIFS for complex tasks involving multiple, intersecting conditions, users gain the ability to efficiently transform raw data into precise, actionable summaries. The foundational process relies on accurately defining the target data ranges, precisely formulating the comparison criteria, and ensuring correct syntax—especially when concatenating operators with dynamic cell references.
To further advance your analytical proficiency and master other essential data analysis techniques within Google Sheets, we highly recommend exploring the following related tutorials:
Detailed tutorial on conditional summation using SUMIF and SUMIFS functions.
In-depth guide to leveraging array formulas for advanced data filtering and aggregation.
Comprehensive explanation of advanced filtering techniques, including the use of the powerful FILTER function.
Cite this article
Mohammed looti (2025). Learning to Count with Conditions: Using COUNTIF and COUNTIFS in Google Sheets. PSYCHOLOGICAL STATISTICS. Retrieved from https://statistics.arabpsychology.com/google-sheets-count-column-if-another-column-meets-criteria/
Mohammed looti. "Learning to Count with Conditions: Using COUNTIF and COUNTIFS in Google Sheets." PSYCHOLOGICAL STATISTICS, 11 Nov. 2025, https://statistics.arabpsychology.com/google-sheets-count-column-if-another-column-meets-criteria/.
Mohammed looti. "Learning to Count with Conditions: Using COUNTIF and COUNTIFS in Google Sheets." PSYCHOLOGICAL STATISTICS, 2025. https://statistics.arabpsychology.com/google-sheets-count-column-if-another-column-meets-criteria/.
Mohammed looti (2025) 'Learning to Count with Conditions: Using COUNTIF and COUNTIFS in Google Sheets', PSYCHOLOGICAL STATISTICS. Available at: https://statistics.arabpsychology.com/google-sheets-count-column-if-another-column-meets-criteria/.
[1] Mohammed looti, "Learning to Count with Conditions: Using COUNTIF and COUNTIFS in Google Sheets," PSYCHOLOGICAL STATISTICS, vol. X, no. Y, ص Z-Z, November, 2025.
Mohammed looti. Learning to Count with Conditions: Using COUNTIF and COUNTIFS in Google Sheets. PSYCHOLOGICAL STATISTICS. 2025;vol(issue):pages.