The COUNTIFS function takes one or more criteria, entered as range/criteria pairs. In this example, the first range/criteria pair is:
Matching any time greater than or equal to the time E5 (5:00).
The second range/criteria pair is:
Matching any time less than the time in E6 (6:30).
With hard-coded values
The formula in E7 could be written with hard-coded time values as follows:
Excel translates a string like "5:00" into the correct numeric time value.
With the TIME function
The formula in E7 could be written with the TIME function like this:
The TIME function provides a simple way to assemble a valid time using discreet hour, minute, and second values.