Spreadsheet: 88687d1288531732-nested-if-statement-otv3-form
Sheet: Sheet1

Overtime Worksheet |  |  |  |  |  |  |  |  |  |  |  | 38357
Employee's name | [NAME] |  |  | Level |  | 5 |  |  |  |  | Eligible for Meal Allowance? | yes
Employee's number | 1234 |  |  | Step |  | 1
Travel Overtime | Date | Day | Holiday | Time In | convert | Time Out | convert | Overtime hours | Travel time hours | Overtime  Multiplier | Overtime Earned | eligible | dbl/sgl | Meal Allowance | ELIGIBLE? | hours eligible | Night Differential | Total Due
No | 2010-10-01 00:00:00 | Friday | 0 | 17:30:00 | 17.5 | 20:20:00 | 20.33333333333333 | 2.833333333333334 | 0 | 1.5 | 255.0000000000001 | 1 | 1 | 5 | 0 | 0 | 0 | 260.0000000000001
No | 2010-10-06 00:00:00 | Wednesday | 0 | 17:30:00 | 17.5 | 22:30:00 | 22.5 | 5.000000000000001 | 0 | 1.5 | 450.0000000000001 | 1 | 1 | 5 | 1 | 0.5 | 3 | 458.0000000000001
No | 2010-10-09 00:00:00 | Saturday | 0 | 08:00:00 | 8 | 19:22:00 | 19.36666666666667 | 11.36666666666667 | 0 | 1.5 | 1023 | 1 | 2 | 10 | 0 | 0 | 0 | 1033
No | 2010-10-10 00:00:00 | Sunday | 0 | 22:00:00 | 22 | 01:30:00 | 1.5 | 3.500000000000001 | 0 | 2 | 420.0000000000001 | 1 | 2 | 10 | 1 | 3.5 | 21 | 451.0000000000001
No | 2010-10-11 00:00:00 | Monday | 1 | 08:00:00 | 8 | 17:00:00 | 17 | 9.000000000000002 | 0 | 2 | 1080 | 0 | 2 | 0 | 0 | 0 | 0 | 1080
 |  |  |  |  |  |  |  | 31.7 | 0 | 8.5 | 3228.000000000001 | 1 |  | 30 |  |  | 24 | 3282.000000000001
 |  |  |  |  |  | Notes:
 |  |  |  |  |  | Travel overtime- |  | this pertains to time spent on travelling while rendering overtime.  Usually this happens if an employee is to partake
 |  |  |  |  |  |  |  | in a company-sponsored event within the city or out of the country
 |  |  |  |  |  |  |  | MAX number of hours to be claimed is 12 hours
 |  |  |  |  |  |  |  | this columns is the computation of number of travel time hours earned if "Yes" is selected from column A (Travel overtime)
 |  |  |  |  |  |  |  | I think my formula works just fine but I do not know how to include the maximum 12-hour condition.  Because there
 |  |  |  |  |  |  |  | are instances in which an employee may have longer than 12-hour flight (from North America to Asia)
 |  |  |  |  |  |  |  | Only employees hired before 05Jan05 are entitled to receive a $5 meal allowance
Travel Time |  |  |  |  |  |  |  | if an employee worked beyond 7pm during holidays and weekends, he gets $10 ($5*2)
Yes |  |  |  |  |  |  | cell contents changed by JM | If he works beyond 7pm on regular working days, he's just entitled to 1 meal allowance
No |  |  |  |  |  |  |  | Regular working days and time are Monday to Friday, 8-5pm
 |  |  |  |  |  |  |  | This is an enetilement if the overtime work is rendered from 10pm until 6 am the next day.
Travel Time Question |  |  |  |  |  | >> crucuial to the calculation! |  | The employee should have started before or exactly 10 pm for him to be eligible for this entitlement
Yes |  |  |  |  |  |  |  | This is equal to 10% of his hourly rate.
 |  |  |  |  |  |  | cell contents changed by JM | I do not exactly how to factor in the in-and-out time in the formula.
 |  |  |  | IF($G7>0.916667,VLOOKUP($G$3,Sheet2!$A$14:$K$18,(Sheet1!$G$4+1)*0.1,FALSE),0)