counting cells between two times

S

Suzie

I have a spreadsheet with occurences of incidents where the time of the
incident is recorded. I'm trying to count the number of times the incident
occurs between certain times (eg 7am and 11am) by using the countif function
with variations on the following formula =countif(B:B, ">=07:00:00 &
<11:00:00") but it is not calculating it correctly. Can somebody help?
 
M

Ms-Exl-Learner

=SUMPRODUCT(($A$1:$A$100>TIME(7,0,0))*($A$1:$A$100<TIME(11,0,0)))
Change the cell reference A1:A100 to your desired range.

Remember to Click Yes, if this post helps!
 
T

T. Valko

Use cells to hold the time boundaries:

A1 = start time = 7:00 AM
A2 = end time = 11:00 AM

=COUNTIF(B:B,">="&A1)-COUNTIF(B:B,">"&A2)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top