Accumulated Time over Periods with Resets

JCH136

New Member
Joined
Mar 30, 2023
Messages
1
Office Version
  1. 365
Platform
  1. Windows
I'm working on a spreadsheet to manage pilot flight hour monitoring and working around associated rules.

Simple part - a pilot can fly a maximum of 50hrs in 7 hours, the total does not reset with days off, only after 7 days (i.e. column E is a simple Cell E14 =SUM(D8:D14) which works)

The challenge is with the below formula sets:
A pilot can fly a maximum of 170 accumulated hours in a 28 day period, however their total resets to 0 with 5 rostered days "OFF" (per column)
A pilot can fly a maximum of 450 accumulated hours in a 90 day period, however their total resets to 0 with 5 rostered days "OFF"
A pilot can fly a maximum of 1,200 accumulated hours in a 365 day period, however their total resets to 0 with 28 rostered days "OFF"

I can create simple formula like the above for the 7 days, however this won't capture the reset. I've tried creating a "COUNTIF" formula to display a "0" in columns F, G, H, with 3 "OFF" events in Column C (i.e. F31 =IF(COUNTIF(C30:C32,"OFF")=3,0,SUM(D5:D32)) however this doesn't take into account the resets either; tried variants with say F28+D29, but this won't account the accumulated totals over the 28 days period.

Part of the challenge is that a pilot might rest multiple times within the 28, 90 or 365 days period.

Any assistance or directions that might work would be appreciated; as i'm stumped and a bit too rusty on Visual Basic to go down that path...

Thanks in advance.
 

Attachments

  • Screenshot 2023-03-30 155443.png
    Screenshot 2023-03-30 155443.png
    44.1 KB · Views: 17

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
Hi,

You could make your life A LOT easier with a well designed Flat Database ...
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top