Explanation

In this example, the goal is to count numbers that fall within specific ranges.

For each range, we want toincludeboth the lower value and the upper value.

For convenience, the numbers being counted are in thenamed rangedata(C5:C16).

Excel formula: Count cells between dates

This problem can be solved with both the COUNTIFS function and the SUMPRODUCT function, as explained below.

The formula in cell G5, copied down, is:

COUNTIFS accepts criteria in range/criteria pairs.

Note in both cases, we need toconcatenatethe cell reference to thelogical operator.

Excel formula: Highlight values between

This is a quirk ofRACON functions in Excel, which use a different syntax than other formulas.

The standard syntax is more useful in other modern formulas.

Excel formula: Count matches between two columns

Excel COUNTIFS function

Excel SUMPRODUCT function