PDA

View Full Version : Creating employee schedules using preferences



dvenn
11-01-2007, 02:55 PM
I am looking for a way to generate employee schedule for a month based on schedule preferences.

here is what I have

ID | Sun | Mon | Tues | Wed | Thu | Fri | Sat
12 8am 8am 8am 8am 8am
14 9am 9am 9am 9am 9am


so lets say I want to schedule these two for the November..

I want a macro that will schedule them accordingly by date based on the day of week preference.

so the output would look like this..

11/1/07 12 8am
11/1/07 14 9am
11/2/07 12 8am
11/2/07 14 9am
11/4/07 14 9am
etc
etc

any help would be appreciated.

Bob Phillips
11-01-2007, 03:17 PM
where do the dates come from, and what happened to the 3rd?

dvenn
11-01-2007, 03:20 PM
the third would be a Saturday which neither employee has a preference for..

The dates could be listed somewhere or determined by the routine (since all dates would need to be evaluated)

Does that make sense?

Bob Phillips
11-01-2007, 03:48 PM
Surely, if the 3rd is a Sat, 2nd is a Fri, and nobody opted for that either.

But I still don't see where the start date is preseneted.

dvenn
11-01-2007, 04:25 PM
the formatting was lost a bit..

12 works M, T, W, Th, F at 8am

14 works Su, M, T, Th, F 9am

which is why they both worked on 11/2, neither worked 11/3, and 14 works on 11/4

currently the date is not presented anywhere (as I did not know the best way to do that portion)....

I can list the dates in a cloumn then have a macro look at the date, determine the day of week for the date... then determine if employee has a pref to work on that day of the week..

but then I didn't know of excel and/or VBA was smart enough to just run 11/1/07 as a date then incrementally add one til end of month...

So to cause confusion wiht this request.. but honestly I don't know the best way to produce the results.. I know the end product and the preferences :(

Bob Phillips
11-01-2007, 04:57 PM
I basically get it, bur I fail to see how the first Sun can be 4/11 and the Fri following can be 2/11.

You have to have logical data or you can't even start.

dvenn
11-01-2007, 05:01 PM
the dow week for 11/4/2007 (m/d/yy) is sun.. 11/2/07 is fri

Sorry I need to remember where people are when posting dates like that..