COUNTIF, Comparisons, and Cell References

While using the COUNTIF/COUNTIFS functions in Excel, I ran across a problem where the formula wouldn’t run. Needless to say, this is very frustrating.

A simple numerical comparison works fine:

But a comparison using a cell reference does not work:

To correct this, put the cell reference outside the quotes and precede it with an ampersand:

For a long chain of comparions, use COUNTIFS:
=COUNTIFS(A1:A10,”<“&B1, A1:A10,”>=”&C1)