View Single Post
  #12   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Auric__ Auric__ is offline
external usenet poster
 
Posts: 538
Default Formula than understands midnight?

Claus Busch wrote:

Am Thu, 24 Apr 2014 05:33:24 +0000 (UTC) schrieb Auric__:

B C D E F G H
23:58 0:06 0:19 0:25 (blank) (blank) 23:52
23:48 23:54 (blank) (blank) 23:58 0:05 23:53
(blank)(blank) 23:35 0:04 (blank) (blank) 23:31

In case it's not obvious, H is wrong. (Should be 0:27, 0:17, 0:29.)


you have to calculate each working time separatly.
Try in H1:
=MOD(C1-B1,1)+MOD(E1-D1,1)+MOD(G1-F1,1)


Okay, thanks for that, but...

I see now that my previous examples make it look like the times are in
groups of 2, but they're not. Any of the times might be blank. Here's a
selection from my log showing several possibilities:

B C D E F G H
21:43 21:52 21:52 0:09
22:01 22:12 22:15 22:20 22:14 0:19
22:57 23:09 23:13 0:16
23:15 23:28 0:13
1:15 1:19 1:23 1:34 0:19
2:50 3:00 3:03 3:05 0:15

(The only thing truly consistent is that if E has an entry, G will be blank,
and vice-versa.)

I tried some variations on your formula, but nothing I came up with works
across the board. I tried checking for blanks and ignoring them, but I can't
quite get that right. (For example, in the line starting with 22:57, I get a
time of 0:04, rather than the correct answer as listed in H, because I don't
know how to check for D-B in that case.)

--
You supply the rumours and I'll provide the wrath.