Google-sheets – use COUNTIF with a range of values (min, max)

google sheets

Just wondering if it is possible or which equation to use if I want to calculate certain values between them and return how many meet those criteria.

For example: I have values in multiple columns being entered as times from 900 to 1800. Now I want the COUNTIF to return the values which fall greater than 1415 but not greater than 1615.

Is this possible?

Currently this is what I have in place:

=COUNTIF(C10:AA10, ">1415")

The problem is I need it to only count values between 1415 and 1615. Not sure how to express this in the function.

Best Answer

You can use countifs with plural "s". Its arguments must alternate between ranges and conditions, like so:

=COUNTIFS(C10:AA10, ">1415", C10:AA10, "<=1615")