I am working on a SS to solve some irritating scheduling problems at work.
We have three shifts (Mids, Days, Eves) and three squads (A, B, C). Two squads are on at a time, while the other squad is on their "weekend", i.e. when A & B are working, C is off.
I've created a SS that draws the appropriate workers from the "master pool" and assigns them to the schedule in accordance with their shift and squad. As the number of workers may increase or decrease, I extended the formula throughout the entire "working" field so as not to miss selecting a worker from the "pool". As the calendar progresses, and squads move from working to having a day off, the schedule automatically moves them from "working" to "off".
Between the "working" and "off" portions of the SS the formula is almost identical. The "working" formula selects workers based on shift and working squad, while the "off" formula selects workers based on the day off schedule and moves them to the "off" section. So if I don't get a #NUM! error in the "working" section, why do I get one in the "off" section?
It seems that I would always get one, or never get one. I don't know why it's only in one section, when the formulas are constructed the same. Plus, I thought the beginning of the formula accounted for that, with a "if it's nothing, than do nothing" code.
While I have you, you'll see columns marked "Leave". An employee, although scheduled to work, can take "Leave" and have the day off. That worker should then move to the "off" section, and someone else has to be hired in their place for the day.
The "Leave" columns are already set with a drop-down with the different types of Leave. Upon selection, I want the worker to move from the "working" area to the "off" area. If a mistake is made, or the worker decides later that he doesn't want the day off, I'd like to be able to undo the change and move the worker back. Can someone help with a VBA/code/macro to make that happen?
Thanks for helping this amateur.
Bookmarks