View Single Post
  #2   Report Post  
Jerry W. Lewis
 
Posts: n/a
Default Number of hours worked between 18:00 and 06:00

=IF(B1<A1,IF(A1<0.75,18-24*A1,0)+IF(B1*248,B1*24-8,0)&"+"&IF(A1<0.75,6,24*A1-18)+IF(B1*248,8,B1*24),

IF(A1<0.75,IF(A1*248,IF(B1<0.75,(24*B1-24*A1)&"+0",18-24*A1&"+"&24*B1-18),
IF(B10.75,18-8&"+"&8-24*A1+24*B1-18,B1*24-8&"+"&8-24*A1)),"0+"&24*B1-24*A1))

will return a text string
normalHrs &"+"& specialHrs

Jerry

clobns wrote:

On a timesheet, an employee earns a special rate when their work hours
go beyond 18:00, but end at 06:00. I can't figure out a formula to
calculate the number of hours an employee works between these time
periods.

Examples: An employee works 00:00-08:00, they would earn a special pay
rate for the six hours worked from 00:00-06:00
or
An employee works 16:00-24:00, they would earn a special rate for the 6
hours worked from 18:00-24:00.
or
An employee works 12:00-20:00, they would earn a special rate for the 2
hours worked from 18:00-24:00

Help!!!! Anybody with an answer?????