View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jacob Skaria Jacob Skaria is offline
external usenet poster
 
Posts: 8,520
Default counting instances

Assuming you have the IN time in Col A and OUT time in ColB..both columns
formatted as time..

In C1 you have the query time. The below formula will return the number of
people at the time mentioned in C1

=SUMPRODUCT(--(A1:A8000<=C1),--(B1:B8000=C1))

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


"AndrewC" wrote:

I have 2 columns of times. Essentailly, the times are customer in and
customer out times. I want to show "how many customers are here at any given
hour?"

I have a graph with columns for each hour of the day. I want to populate
that graph. For example, if 4:30 pm falls between the 2 times, count one for
the "4-5pm" column on the graph.

Any ideas? I have about 8,000 lines of data. THANK YOU!