Calculate Data

  • Thread starter Thread starter c5883
  • Start date Start date
C

c5883

I am trying to sum information based on a timeframe. Please see exampl
below

NAME TIME DATE
bob 4 2/14/2004 00:05:00
James 10 2/16/2004 7:00:00
bob 10 2/13/2004 19:00:00

I want to get the total time for bob between 7:00 PM and 7:00 AM

eg IF(DATE is BETWEEN 2/13/2004 7:00 PM AND 2/14/2004 7:00 AM) SUM TIM
for bob)

Any ideas
 
One way:

Say your criteria was in G1 (bob), G2 (2/13/2004 19:00) and G3
(2/14/2004 07:00):

=SUMPRODUCT(--(A1:A100=G1),--(C1:C100>=G2),--(C1:C100<=G3),B1:B100)
 
Back
Top