D
dcleave
Hi,
I am using Excel to program a staff rota. This is posing me a few
problems, and I would appreciate any help.
Imagine a block of cells 50 rows high and 28 columns across. Each row
represents the workpattern of a member of staff, and each column is one
day.
A cell can be empty (Day off) or have a 'D' (day-shift)
Each person has to work 13 shifts in the 28 days
I want a macro to enter the 'D's into the sheet, but there are some
rules that must be followed.
1) Each row has 13 'D's.
2) Each column should have roughly the same number of 'D's (ie the
same number of staff) - a difference of 1 is OK.
3) D's should be clustered into 2's & 3's in each row
4) Each row will start out with 5 'D's in place that have been entered
by hand: these cannot be moved.
I am finding this extremely tricky. The problem I have is following one
rule tends to cause another to be broken. ie I can get the 'D's to
cluster or to have the same number in each column, but not both at the
same time.
I will be very grateful for any help.
David
I am using Excel to program a staff rota. This is posing me a few
problems, and I would appreciate any help.
Imagine a block of cells 50 rows high and 28 columns across. Each row
represents the workpattern of a member of staff, and each column is one
day.
A cell can be empty (Day off) or have a 'D' (day-shift)
Each person has to work 13 shifts in the 28 days
I want a macro to enter the 'D's into the sheet, but there are some
rules that must be followed.
1) Each row has 13 'D's.
2) Each column should have roughly the same number of 'D's (ie the
same number of staff) - a difference of 1 is OK.
3) D's should be clustered into 2's & 3's in each row
4) Each row will start out with 5 'D's in place that have been entered
by hand: these cannot be moved.
I am finding this extremely tricky. The problem I have is following one
rule tends to cause another to be broken. ie I can get the 'D's to
cluster or to have the same number in each column, but not both at the
same time.
I will be very grateful for any help.
David