Shift Pattern

daleholden

Board Regular
Joined
Sep 22, 2002
Messages
243
Is it possible to have a 10 week shift pattern listed in excel. The to have a macro so when you put up a set of dates you insert on the correct date then run the macro and it enters all the shifts to the correct dates??
 
Ok i would like to enter a cell run a macro and the shift pattern be filled in automatically with the correct shift on the correct date



_________________
People prefer to follow those who help them, not those who intimidate them.
This message was edited by daleholden on 2002-09-23 19:39
 
Upvote 0

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
222.xls
ABCDEFGH
1MONTUESWEDTHURSFRISATSUN
205/03/200106/03/200107/03/200108/03/200109/03/200110/03/200111/03/2001
313pm x 12pm10pm x 7am10pm x 7amRDRDRDRD
412/03/200113/03/200114/03/200115/03/200116/03/200117/03/200118/03/2001
527am x4pm7am x 4pm3pm x 12pm3pm x 12pm10pm x 7am10pm x 7amRD
619/03/200120/03/200121/03/200122/03/200123/03/200124/03/200125/03/2001
73RDRDSPARE7am x 4pm7am x 5pm5pm x 3am4pm x 11pm
826/03/200127/03/200128/03/200129/03/200130/03/200131/03/200101/04/2001
9410pm x 7am10pm x 7amRDRDRDSPARE7am x 4pm
1002/04/200103/04/200104/04/200105/04/200106/04/200107/04/200108/04/2001
1157am x 4pm7am x 4pm3pm x 12pm10pm x 7am10pm x 7amRDRD
1209/04/200110/04/200111/04/200112/04/200113/04/200114/04/200115/04/2001
136RDRD7am x 4pm7am x 4pmRDRDRD
1416/04/200117/04/200118/04/200119/04/200120/04/200121/04/200122/04/2001
1578am x 4pm8am x 4pm8am x 4pm8am x 4pm8am x 4pm7am x 5pm7am x 4pm
1623/04/200124/04/200125/04/200126/04/200127/04/200128/04/200129/04/2001
1788am x 4pm8am x 4pm8am x 4pm8am x 4pm8am x 4pmRDRD
1830/04/200101/05/200102/05/200103/05/200104/05/200105/05/200106/05/2001
199RD7am x 4pm7am x 4pm3pm x 12pm5pm x 3am10pm x 7am10pm x 7am
2007/05/200108/05/200109/05/200110/05/200111/05/200112/05/200113/05/2001
2110RDRDRDRD7am x 5pm7am x 5pm4pm x 11pm
2000
 
Upvote 0
Dale,

My remark about mind-reading stands! Could you please explain in 'natural language' what you want. How do we know what shift patterns are to go in each day? I assume RD = Rest Day = weekends?

Please be more explicit about your requirements...

Paddy
 
Upvote 0
Sorry Paddy

Well here is the complete 10 week pattern, the shift pattern repeats it self exactly every 10 weeks.

But in stead of cutting and pasting to different days. I would like only have to enter the full pattern then when i selected an empty 10 week pattern i would enter cell on Monday week 1 run a macro and it fills in the the whole 10 weeks.

Does that make sense?
 
Upvote 0
If the pattern always starts on a Monday & runs for 10 weeks, why not keep the shift times & have the dates change with a formula based on the data in the 'first monday of the 10 week period' cell?

Paddy
 
Upvote 0
Sure how would i do that?

Would the formula change everydate?

So would i select the 1st date then it changed all the others?
 
Upvote 0
Afterthoughts:

1) Notice that the formulas in col B are different to the rest
2) I didn't write all the formulas long-hand - just fill in the key ones & copy down / across as necessary...
3) You could add some conditional formatting / data validation to B2 to check that the date entered in B2 is a monday:

=weekday(b2)<>2

or similar.

Paddy

Paddy
 
Upvote 0
Thanks Paddy so simple how do i add the =weekday(b2)<>2 to B2 i have tried it but it still accepts an date. I tried going to conditional formatting and entering the formula.

I tried in the datevale formula but still not working.
 
Upvote 0

Forum statistics

Threads
1,216,070
Messages
6,128,618
Members
449,460
Latest member
jgharbawi

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