Thread: Need help...
View Single Post
  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Pete_UK
 
Posts: n/a
Default Need help...

No, you will have two columns of data for "In" (the date_time and "In"
- assume A and B) and two columns of "Out" data (date_time and "Out" -
assume C and D).

Copy C2:D_whatever and move it directly underneath A_whatever, so that
you will have twice as many records but only occupying columns A and B.
Then you can sort A and B together using A as the sort field and this
will give you a true sequence of events. Something like:

Date_Time In_Out
03/01/2004 05:40 In
03/01/2004 07:15 In
03/01/2004 07:40 Out
03/01/2004 08:05 Out
03/01/2004 09:15 In
03/01/2004 10:20 Out
03/01/2004 11:09 In
03/01/2004 13:25 In

using your second set of sample data. (Note, I have used row 1 for
headings, but leave C1 blank).

You can now enter the formula in C2 and copy down, and the other
formula in D3 and copy that down. You might like to amend this to:

=IF(C2=0,A3-A2,"")

to help the dead times stand out more clearly.

Hope this helps.

Pete