PDA

View Full Version : [Help] VBA for scheduling



coolzman
04-26-2018, 05:20 AM
Hi all

I am new to this forum, and my knowledge of Excel stops at the formula. I would like to learn VBA to improve my knowledge in Excel so that I can automate certain process in the course of my business.

For example, I would like to automate a schedule for my staff with the following criteria:-

Facts:

14 staff -> 5 stationed in Location A, 9 stationed in Location B
Working hours are from 8am to 5pm daily
They each have a 1.5 hours break for follow-up with clients (from 8am to 9.30am, 9.30am to 11.00am, 1pm to 2.30pm and 2.30pm to 4pm)
They will have a lunch break from either 11am to 12pm, or 12pm to 1pm
As far as possible, I would like to have a VBA that can automate this process in random for Location A and Location B separately.
If also possible, it will be really good if the staff can have different lunch mates every week for Location A and Location B separately.


I have been doing this manually for several months and I had to spend 3 hours each time to do the schedule for the whole month. I believe that I can spend the time wisely for analysing data for my business.

Thank you in advance for those who are willing to help and may god bless you :)

Regards
Shayne

SamT
04-26-2018, 08:00 AM
1) Coders only know three numbers, zero, one, and many. So... you have many locations with many staff. This means that the code must be able to access a list of current staff at each location.

3) Many follow up breaks with many staff randomly assigned to use each break. How many breaks per staff? Does the assigned break time(s) change daily, weekly, or what? A list of Followup Break times would be handy.


Both/All Locations on one sheet? or One sheet per location?