VBA for Scheduling

Aisidi28

New Member
Joined
Jul 27, 2022
Messages
1
Office Version
  1. 365
Platform
  1. Windows
Hello guys, I need help creating a VBA for scheduling.

I am responsible for making work schedules for the volunteers in my church. To make it easy, here is a screenshot of the mock schedule format:


Screenshot 2022-07-28 213246.png


Let me explain the schedule to you.
- So the schedule is for every week starting from the 2nd week of September to the 3rd week of October.
- For every Friday we only need 1 volunteer
- For every Saturday we need 2 volunteers
- For every Sunday we need 3 volunteers

So I want the “Create Schedule“ button to autofill the work schedule

The rules for this schedule are:
1. Volunteers can only work once in a week
2. The minimum working time of each volunteer in a month is 1 and the maximum working time in a month is 2
3. However, in those 2 months, each volunteer can only work a maximum of 3 times (not 4).
4. If possible, volunteers should not work 2 weeks in a row (they need a break of at least 1 week after work)
5. Volunteers can work a maximum of once on a Friday for this 2 month
6. Likewise for Saturday, volunteers can work a maximum of once on Saturday in this 2 month
7. Exception on Sunday, because Sunday always requires more people, so volunteers can work a maximum of twice on Sunday in this 2 month
8. However, if possible, the second time they work on a Sunday should not be in the same month. That means, if the volunteer need to work twice on a Sunday, then they cannot work on a Sunday in the 4th week of September if they have already worked on a Sunday in the 2nd or 3rd Sunday of September.

I hope my explanation is easy to understand

Thank you in advance!
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".

Forum statistics

Threads
1,213,489
Messages
6,113,947
Members
448,534
Latest member
benefuexx

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