View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
T. Valko T. Valko is offline
external usenet poster
 
Posts: 15,768
Default counting cells within certain time frames - 24 hour clock

Try these. Assuming no empty cells.

12:00:00 AM to 12:59:59 AM

=SUMPRODUCT(--(HOUR(A1:A10)=0),--(HOUR(A1:A10)<1))

1:00:00 AM to 1:59:59 AM

=SUMPRODUCT(--(HOUR(A1:A10)=1),--(HOUR(A1:A10)<2))

Follow that pattern until you get to

23:00:00 to 23:59:59

=SUMPRODUCT(--(HOUR(A1:A10)=23),--(A1:A10<1))

--
Biff
Microsoft Excel MVP


"lummox" wrote in message
...
I am looking to count the number of cells that meet criteria in a 24 hour
clock format.

The cell range is C2:C1395.
If a time falls between 00:00:00 and 00:59:59, I want to count it. This
would continue for the remaining 23 hours

I was able to get this to work at one point using COUNTIF, but now it is
not
functioning and an error keeps appearing. Also, would it make a difference
in
the formula if I was using Excel 03 versus 07?

Thanks for any help.