View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Jacob Skaria Jacob Skaria is offline
external usenet poster
 
Posts: 8,520
Default Count time formatted data within range

Try
=COUNTIF(A:A,"" & TIME(9,0,0))-COUNTIF(A:A,"=" & TIME(10,0,0))

If this post helps click Yes
---------------
Jacob Skaria


"Unique_Identifier" wrote:

I have a column of time formatted data in which I would like to count
conditionally those cells whose values fall within certain ranges. For
example, the data may look like this:

9:45 AM
9:58 AM
11:30 AM
12:15 AM

I would like to count how many cells contain a value between 9:00 AM and
10:00 AM. I have tried =countif(range,AND(range9:00 am, range<10:00 am)) but
I only get a zero return. I've also used the AND function to reference other
cells with the limiting values with no success.

I'm currently using excel 2003, but I hope to be moving up to 2007 soon
where I will be taking advantage of some functions that don't exist in 2003,
so I don't want to do anything that I will lose when I upgrade.

Any help is greatly appreciated.