Table of Contents
Introduction: Precise Conditional Counting in Google Sheets
Effective data analysis frequently requires isolating and counting records that meet specific, complex criteria. In environments like Google Sheets, one common analytical requirement is determining how many data points fall within a defined numerical band—that is, counting values that are simultaneously greater than a lower threshold and less than an upper threshold. While the basic COUNTIF function handles single conditions excellently, achieving this dual boundary check efficiently demands the use of the powerful COUNTIFS function.
The COUNTIFS function is specifically engineered to apply multiple Criteria concurrently, linking them with the logical AND operator. This capability is paramount when defining a closed numerical interval, ensuring that only data points satisfying both the minimum and maximum limits are included in the final tally. This method eliminates the need for complex, error-prone nesting or subtraction techniques, yielding clean, accurate, and easily auditable results for targeted data segmentation.
In the following guide, we will break down the syntax and practical application of COUNTIFS to solve the specific challenge of counting entries greater than X but less than Y. We will demonstrate how to structure the formula using appropriate logical operators and range repetition, followed by a step-by-step walkthrough using a real-world dataset to solidify your understanding of this essential spreadsheet technique.
Mastering the COUNTIFS Syntax for Range Counting
The key to counting within a numerical range using COUNTIFS lies in specifying the same data Range twice, associating each instance with one of the required boundary Criteria. The first criterion establishes the lower limit (the ‘greater than’ test), and the second establishes the upper limit (the ‘less than’ test). Both criteria must evaluate to TRUE for a cell to be counted.
The generic structure of the COUNTIFS function requires pairs of arguments: criteria_range1 followed by criterion1, and then criteria_range2 followed by criterion2, and so on. For our specific objective, where we are counting items in the range B2:B11 that are greater than 15 but less than 25, the structure ensures maximum clarity and operational efficiency. The comparison operators (e.g., > or <) must be included with the numerical value within double quotation marks because they are treated as text strings by the function.
The formula below perfectly encapsulates this conditional logic. It first checks if the values in B2:B11 exceed 15, and subsequently checks the exact same range to ensure those same values also fall below 25. This dual application guarantees that the counted cells satisfy the compound inequality:
=COUNTIFS(B2:B11,">15",B2:B11,"<25")
This construction ensures that only the intersection of the two conditions is counted, effectively isolating the desired data band (15, 25) from the rest of the dataset.
Example: Counting Basketball Player Points within a Band
To demonstrate this principle in a practical setting, imagine we are analyzing player performance data in Google Sheets. Our dataset tracks points scored by basketball players, and we are interested in identifying the count of players who achieved a moderate performance level—specifically, those who scored more than 15 points but less than 25 points. This range might represent average performers, excluding outliers who scored very low or exceptionally high.
The dataset below shows the player names and their total points scored in column B (the numerical Range of interest is B2:B11). Our goal is to apply the dual criteria using COUNTIFS to rapidly extract this specific subset of data.

Applying the COUNTIFS formula directly to this data set transforms a potentially tedious manual filtering process into a single, automated calculation. By explicitly setting both the lower boundary (>15) and the upper boundary (<25), we ensure that the resulting count is highly targeted and relevant to the analytical question posed. This efficiency is critical when dealing with much larger, more complex spreadsheets where manual inspection is infeasible.
Implementation: Applying the Dual Criteria Formula
To execute the count, you must input the full COUNTIFS formula into a designated output cell (e.g., cell D2). The process is straightforward, but precision in syntax, especially regarding the quotation marks for the logical operators, is paramount for correct execution. If the boundaries (15 and 25) were held in separate cells, you would need to concatenate the operator and the cell reference, but since our criteria are fixed numbers, we embed them directly.
Here is the exact formula, applied to count the number of cells in the Points column (B2:B11) that satisfy our defined performance band. The formula clearly articulates the required conditional logic to the COUNTIFS function:
=COUNTIFS(B2:B11,">15",B2:B11,"<25")
The COUNTIFS function iteratively checks each cell in the B2:B11 Range. For a cell containing the value 22, the evaluation is: (22 > 15) is TRUE AND (22 15) is TRUE AND (30 < 25) is FALSE. Since the second criterion is FALSE, the cell is excluded from the count. This rigorous logical check ensures accuracy.
Interpreting and Validating the Calculated Result
Once the formula is entered, Google Sheets immediately returns the calculated count. The following screenshot illustrates the result of applying the COUNTIFS function to our player data.

The resulting count is 3. This numerical output signifies that exactly three players in the dataset scored points falling strictly within the range of 15 to 25. This immediate metric provides actionable intelligence, allowing analysts to draw conclusions about the distribution of performance without needing to manually inspect every entry.
For confirmation, it is helpful to visually inspect the data and manually verify the entries that satisfy both Criteria. We are looking for values strictly between 15 and 25.
- Value 18: Included (18 > 15 and 18 < 25)
- Value 20: Included (20 > 15 and 20 < 25)
- Value 22: Included (22 > 15 and 22 < 25)
Values such as 15, 25, 10, and 30 are correctly excluded because they fail at least one of the strict inequality conditions. The visual confirmation, shown below, reinforces that the COUNTIFS function executed the dual filtering requirement precisely, successfully identifying the three qualifying data points.

COUNTIFS vs. COUNTIF: Why the Plural Function is Superior
A common trap for users is attempting to replicate the boundary counting functionality using the singular COUNTIF function. While subtraction logic (e.g., counting everything above 15 and subtracting everything above or equal to 25) can mathematically arrive at the correct answer for this narrow scenario, it introduces complexity and reduces the formula’s transparency. Such methods are error-prone if the comparison operators need subtle adjustment (e.g., changing from ‘>15’ to ‘>=15’).
The fundamental advantage of COUNTIFS is its direct adherence to the logical requirement of AND concatenation. When we use COUNTIFS, we explicitly define two separate, mandatory Criteria that must intersect. This makes the formula significantly more readable and maintainable, especially when working with shared or complex spreadsheets. Should future analysis require adding a third condition—for example, counting only players from “Team A” within the 15-25 point range—the COUNTIFS function allows for seamless extension: you simply add the third criteria_range/criterion pair without disrupting the existing logic.
Therefore, for any analysis involving multiple simultaneous conditions across the same or different data ranges, COUNTIFS should always be the default choice. It represents the best practice for robust conditional counting in Google Sheets, ensuring that the defined boundaries are respected precisely and efficiently.
Summary and Best Practices
The COUNTIFS function is an indispensable tool for data segmentation, particularly when counting entries within a numerical band. By understanding the requirement to repeat the target data Range and correctly format the logical boundary criteria using quotation marks, users can perform sophisticated conditional counts with ease. This capability is essential for filtering transactional data, setting quality control limits, or evaluating performance metrics against predefined benchmarks.
Always ensure that your logical operators match the inclusivity or exclusivity required by your analysis. For a count strictly greater than X and strictly less than Y, use > and = and <= respectively. Precision in these operators guarantees the integrity of your results. By employing COUNTIFS, you leverage a function designed for complex conditional logic, leading to more transparent and flexible data management.
Note: For comprehensive details and examples regarding all possible uses of the COUNTIFS function, consult the official Google Sheets documentation here.
Cite this article
stats writer (2025). Google Sheets: COUNTIF Greater Than But Less Than Some Number. PSYCHOLOGICAL SCALES. Retrieved from https://scales.arabpsychology.com/stats/i-am-trying-to-count-the-number-of-cells-in-a-column-that-are-greater-than-but-less-than-some-number-i-have-tried-the-followingcountifa2a200-1but-it-does-not-work-how-can-i-count-the/
stats writer. "Google Sheets: COUNTIF Greater Than But Less Than Some Number." PSYCHOLOGICAL SCALES, 18 Nov. 2025, https://scales.arabpsychology.com/stats/i-am-trying-to-count-the-number-of-cells-in-a-column-that-are-greater-than-but-less-than-some-number-i-have-tried-the-followingcountifa2a200-1but-it-does-not-work-how-can-i-count-the/.
stats writer. "Google Sheets: COUNTIF Greater Than But Less Than Some Number." PSYCHOLOGICAL SCALES, 2025. https://scales.arabpsychology.com/stats/i-am-trying-to-count-the-number-of-cells-in-a-column-that-are-greater-than-but-less-than-some-number-i-have-tried-the-followingcountifa2a200-1but-it-does-not-work-how-can-i-count-the/.
stats writer (2025) 'Google Sheets: COUNTIF Greater Than But Less Than Some Number', PSYCHOLOGICAL SCALES. Available at: https://scales.arabpsychology.com/stats/i-am-trying-to-count-the-number-of-cells-in-a-column-that-are-greater-than-but-less-than-some-number-i-have-tried-the-followingcountifa2a200-1but-it-does-not-work-how-can-i-count-the/.
[1] stats writer, "Google Sheets: COUNTIF Greater Than But Less Than Some Number," PSYCHOLOGICAL SCALES, vol. X, no. Y, ص Z-Z, November, 2025.
stats writer. Google Sheets: COUNTIF Greater Than But Less Than Some Number. PSYCHOLOGICAL SCALES. 2025;vol(issue):pages.
