Home |
Search |
Today's Posts |
|
#1
![]() |
|||
|
|||
![]()
Thanks for the help.
While these are great suggestions I can't use any of these solutions. I have over 300 drivers that work on a rotating 3 week schedule. Regular hours are calculated automatically using a vlookup function based on the date. A driver, for example would work group 1A on week1, 1B on week2, and 1C on week3 and week4 would be 1A again and continue on this cylce. The lookup table looks for the date reference under each drivers name and returns the corrosponding group. The regular work hours are looked up by the group value (e.g. 1B). I do thank you for your time and help. Martin "Trying to excel in life but need help" wrote: I will try to explain clearly what I am trying to accomplish. I hope this makes sense. I work in the transportation iindustry and have the dubious pleasure of designing a spreadsheet which may be outside of my skill level. The Highway Traffic Act in Ontario, Canada stipulates that a truck or bus driver is restricted to the following hours of work: A driver may not drive a truck or a bus after being on duty for, a) 60 hours in 7 consecutive days, or b) 70 hours in 8 consecutive days, or c) 120 hours in 14 consecutive days. I have drivers names and their assigned work hours in several worksheets. I can calculate hours worked for each day. The worksheets are labeled Week 1, Week 2, Week 3 and so on. What I need is a way to track and warn me if an operator exceeds the allowable hours in any 7, 8, or 14 day period. The periods are not static. To put it another way, the drivers are always working the 7th, 8th or 14th day. As an example; A driver starts work on Monday, before he reaches Sunday he has accumulated 60 hours and must not continue to work in this 7 day stretch so he is forced to take Sunday off. He returns to work on the next Monday. His seven day stretch does not start over. He must now calculate the hours worked from the previous Tuesday to determine how many hours he is allowed to work. I have been trying to use this formula in the Monday cell of the Week 2 worksheet and continue changing it to calculate the previos seven days as I move along to the next day. Week 2 Monday Cell =IF(SUM('Week 1'!E5:$K5)=[60]:00,"Over 60hrs",VLOOKUP($C5,'Platform, Report & Travel'!$A$6:$H$52,2,FALSE)) Week 2 Tuesday Cell =IF(SUM('Week 1'!F5:$K5)=[60]:00,"Over 60hrs",VLOOKUP($C5,'Platform, Report & Travel'!$A$6:$H$52,3,FALSE)) Can anyone think of an easier or more sensible way? I can either have all of the weeks in one file using worksheets or have each week in it's own file. Thank you in advance, Martin |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Vlookup & Lookup function error | Excel Worksheet Functions | |||
carrying a hyper link when using the vlookup function | Excel Worksheet Functions | |||
carrying a hyper link when using the vlookup function | Excel Worksheet Functions | |||
Regarding IF function or vLOOKUP function | Excel Worksheet Functions | |||
vlookup and IF function | Excel Worksheet Functions |