View Single Post
  #5   Report Post  
Paxton31 Paxton31 is offline
Junior Member
 
Posts: 3
Default

Quote:
Originally Posted by joeu2004[_2_] View Post
Errata.... I wrote:
"Paxton31" wrote:
F2: =MIN(8,(C2-B2+E2-D2)*24)
G2: =MIN(4,(C2-B2+E2-D2)*24 - F2)
H2: =(C2-B2+E2-D2)*24 - F2 - G2

Note: I assume that B2, C2, D2 and E2 have date and time, or midnight
does occur between B2 and C2 or between D2 and E2. Right?


I meant to write: "or midnight does __not__ occur between" the time-in and
time-out times.

The point is: if the cells contain only time and the shift spans midnight,
the calculations will not be correct. But it is consistent with your
original calculations.
Thank-you, so, so much. Brilliant! It works perfectly. :)