View Single Post
  #6   Report Post  
Harlan Grove
 
Posts: n/a
Default

"Stefan Stridh" wrote...
I have two columns with date + time like this

Startdate Enddate
11/08/2004 19:00 11/08/2004 22:17
11/08/2004 19:30 11/08/2004 21:24
11/08/2004 22:30 11/08/2004 23:50
11/09/2004 00:00 11/09/2004 00:31
11/09/2004 00:30 11/09/2004 04:31
11/09/2004 02:00 11/09/2004 03:20
11/09/2004 15:00 11/09/2004 15:12

If i just sum up the difference in minutes between each row then I
will get the total time in minutes but I'm looking for the effective
time.

Some of the records are overlapping like record 1 and 2.
The effective time in record 1-2 is just 3h 17 minutes since record 2
fits inside the frame of the first record.

Is there an easy way to calculate this ?


If the ranges above were A1:A7 for start date/time and B1:B7 for end
date/time with headings in A1:B1, then try this formula in C3 (yes, col C
row *3*).

=MAX(B$1:B2)-MAX(IF(COUNT(B$1:B1),B$1:B1,0),A2)

Then copy C3 and paste into C2:C7.