# Re: Programming for a Shift Rota Pattern

Glad I'm not working that roster!

On 30 Apr 2007 05:26:15 -0700, shriil <sanjib.lahiri@xxxxxxxxx> wrote:

Hi

I am heading a department which has 47 employees, working in Shifts,
namely Morning, Evening & Night Shifts. If Morning is M, Evening is
E , Night is N and Off day is O, my dept employess follow the
undermentioned 21 day cycle, which repeats itself for each employee

MMMEEEOMMEENNOMMMEENO in a relay fashion, i.e. if we consider the
First day of a month, Employee 1 may be doing duty as Per Point No. 5
of the 21-day cycle on that day, Employee 2 - Pt. No. 6 , Employee 3 -
Pt No. 8. On the second day, Employee 1 will be doing the duty as per
Point No. 6, Employee 2 - Pt. No. 7 Employee 3 - Pt. No.9, and so on
and so forth.

Now I need to bring out the Rota pattern of the employees for each
month. By running a macro I have been able to make a sheet with
Columns starting from the 1st day of month in question to the Last day
of the month along with Rows for each employee

Question 1:
Now for the employees, how do I define the positioning of each
Employee on each day, as per the pattern he is following within the 21-
day cycle as well as the relative positioning of other Employees on
that date and on the days that follow?

Question 2:
When I start with another month, how is it possible to know the Rota
Duty of an Employee on the first day of the month with respect to the
preceding duty he did on the last day of the previous month?
.

## Relevant Pages

• Re: Relation Schemata vs. Relation Variables
... of triples, where each element represents only a distinct component ... transition describes the entire difference between two successive database ... The candidate keys are {EMPLOYEE#, DUTY} and ...
(comp.databases.theory)