LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Trying to excel in life but need help
 
Posts: n/a
Default Nested if, sum & vlookup Function

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
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Vlookup & Lookup function error Beginner Excel Worksheet Functions 9 January 11th 05 12:37 AM
carrying a hyper link when using the vlookup function mike Excel Worksheet Functions 1 November 19th 04 03:49 AM
carrying a hyper link when using the vlookup function mike Excel Worksheet Functions 2 November 18th 04 04:22 PM
Regarding IF function or vLOOKUP function wuwu Excel Worksheet Functions 2 November 13th 04 01:38 PM
vlookup and IF function cambridge Excel Worksheet Functions 5 October 28th 04 08:29 PM


All times are GMT +1. The time now is 06:52 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"