Reset Sliding Window Calculation

D

David Willey

I am having a tough time with a spreadsheet to calculate Driver's
Hours of Service. DOT rules allow a driver 70 hours in an 8 day
period. Old spreadsheet would use simple sum for previous 8 days.
New rules allow reset of hours to 70 if the driver has 34 consecutive
hours off. The only data entry for each day is StartTime and OffTime.
These are time formatted and the difference between the two is the
HoursWorked. Also the difference between the OffTime and the next
StartTime is the HoursOff. If the HoursOff is >= 34 the 70 hours is
reset.

I am having a tough time with a spreadsheet to calculate Driver's
Hours of Service. DOT rules allow a driver 70 hours in an 8 day
period. Old spreadsheet would use simple sum for previous 8 days.
New rules allow reset of hours to 70 if the driver has 34 consecutive
hours off. The only data entry for each day is StartTime and OffTime.
These are time formatted and the difference between the two is the
HoursWorked. Also the difference between the OffTime and the next
StartTime is the HoursOff. If the HoursOff is >= 34 the 70 hours is
reset.

1/2/03 1/3/03 1/4/03 1/5/03 1/6/03 1/7/03
Thu Fri Sat Sun Mon Tue
Hours Available 45.00 36.00 27.00 27.00 70.00 62.00
Start time [Entry] 8.00 8.00 8.00 9.00
Off Time [Entry] 17.00 17.00 16.00 17.00
Hours Worked {Display} 9:00 9:00 0:00 0:00 8:00 8:00
Hours Worked {Display} 9.00 9.00 0.00 0.00 8.00 8.00
Consecutive Hr off (2) 14:00 15:00 7:00 31:00 55:00 17:00

I think I need to setup some type of sliding window to calculate the
hours worked in the previous eight (8) days and reset if consecutive
rest criteria is met (=>34 hours). Can I setup some type of dummy data
row containing hours worked and set the previous eight to zero and
then use this row to calculate hours used? This would leave actual
hours worked data intact and represent new eight day window.

Any suggestions would be greatly appreciated.
Regards,

David
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top