I'm gonna show you how to schedule different staffing levels for different
locations in one schedule here we have a schedule and I have my different
locations are indicated by different colors here now each each location you
would have names obviously beside beside these locations but each one's have
different staffing requirements so let's run the schedule and you're gonna get a
dialog box and let's let's just do location one for starters and let's say
we need six people and then they're required to work five shifts this month
and so what we're gonna do is enter ships and close this box and you can see
that we now have the staffing for location one calculated so let's clear
the schedule and let's say that we're going to be doing level or location one
and location three so we're gonna run the schedule again and get our user form
coming up and so we're going to be going six and five and then let's go for
location for or location we three we let's go 4 and 4 and then location for
we're gonna go 4 and 4 as well okay and that's enter shifts and then let's close
the dialog box and now you can see it we have schedules everybody for these three
locations that we've selected we need to have two people working at all times and
here we do or a short heat for these at the bar at the end we have calculated
the number of people working weekends and so there's our one and two the two
is a maximum and so let us let me show you what the code looks like and so I
have a dialog box up and this is a user for
and so each of the the first box which is a number of people I called it r1 and
the r2 r3 r4 and then so that's the number of people required and the at the
second box is not named no named r1 s which is this level and how many staff
do they require so let's right click on enter shifts and then we will see the
code okay so for each one I have declared for love for 1 I've set a and a
required and a required staffing and so I've done the same for all the way down
for all the way down until II so we have the five levels now I have calculated
the date as the start date as from these cells on on this is a start date this is
the end date and I've calculated the difference here so what we have here is
we have start date if equals this cell end date equals that cell and then we
have E X which is the extent of the the days is end date - start date plus one
for each of those I have if it has something if it has nothing in it then
we're gonna go to the next one and see if it has something in it but if it does
have something in it then I'm going to say so for a one A equals r1 plus text
I'm just selecting where the line starts the line starts over there the code and
then I'm saying a ours that's the number of staff we have is the this this cell
here whatever it has in there and a the staffing requirements equals the total
number of days divided by then the number of staff that are required okay
so now let's go down and so that's the same for each one of those and now I'm
going to go down to the the actual putting the W's on the form and I'm
going to say once again I'm if it's blank and go to the next one and
do while I which is the wrong number meeting is less than or equal to a which
is the number of that we calculate is the number of line and then I go sheet
one cells I three select and then I am going if Z is less than so the the
number of days is less than the total days and and if this act act active cell
has nothing in it and we're going to put a W in it and I'd continue that from
each of the shifts I will of course include this code in in the description
of my video is this going to work for your organization let me know below
please subscribe