# How to calculate task schedule based on 4-days work and 4-days OFF including weekends

1. ## How to calculate task schedule based on 4-days work and 4-days OFF including weekends

Dear Experts,

I'm able to do formula for the straight dates, now i need to have condition that if the 4-days/32hrs of scheduling is done, the next task should take the scheduling date after 4-off days.

I've updated the attached excel sheet to show sample data and expected outcome for reference to my problem.

I want to calculate the dates based on the hours scheduled daily. 8-hrs worked is considered 1-day, after completing 4-working days an employee will have 4-days off in the schedule and the next schedule date should be after the 4-off days/32hrs.

Please i need help in this regards, Thanks!

3. ## Re: How to calculate task schedule based on 4-days work and 4-days OFF including weekends

I added S6:U20 to test our my proposed solution. It matches your expected results but it could use some more comprehensive testing!

In T7 copied down to T11:
Formula:
The first part of the expression sums the hours up to the previous row and allows 8 hours per day. The second part of the expression adds 4 days every 32 hours.

Then in U6 copied down to U11 and almost but not quite identical formula:
Formula:
The "-0.00001" accommodates an 8 hour day being finished on the the same day rather than spilling into the following day.

The S13:U20 test case uses the same formulas, but note that that can't simply be copy/pasted.

I have attached an update with the above

Let us know if this works for you.

4. ## Re: How to calculate task schedule based on 4-days work and 4-days OFF including weekends

Thank you GeoffW283, it works as intended, i tried all the test cases and its working perfectly. Thanks once again for your support!

5. ## Re: How to calculate task schedule based on 4-days work and 4-days OFF including weekends

No problem, glad to help and thanks for the reputation points!

There are currently 1 users browsing this thread. (0 members and 1 guests)