Hello all,
I am new to this forum, but not new to excel/VBA. I have a problem that I can't seem to work out in my own head, and I believe it's a very simple one which makes it all the more frustrating to me. I have developed rotating shift schedules for my workplace for 6 different departments. It is broken down into separate tabs for each week of the year, with a section for day shift and a section for night shift. There are 4 shifts with 8 jobs on each shift. The file is created for each calendar year. I have a template with all the info from each department saved in a "Setup" tab. For the last few years, I've had to do a find/replace exercise for 32 different names in each department in order to populate the basic rotation for the whole year. The template has the "name" spots labeled as "A1, A2, A3", "B1, B2, B3" from A1 through A8, B1 through B8, C1 through C8, and D1 through D8. What I'm looking to be able to do is enter the names next to a list of A1 through D8, and then use that to populate out to the week tabs. I'll try to explain this with the examples below.
I want to be able to set up the names like this on the setup tab (all the way down through D8):
Excel 2010
<tbody>
</tbody>
SetupAnd have it populate each tab which begins like this:
Excel 2010
<tbody>
</tbody>
Excel 2010
<tbody>
</tbody>
I am new to this forum, but not new to excel/VBA. I have a problem that I can't seem to work out in my own head, and I believe it's a very simple one which makes it all the more frustrating to me. I have developed rotating shift schedules for my workplace for 6 different departments. It is broken down into separate tabs for each week of the year, with a section for day shift and a section for night shift. There are 4 shifts with 8 jobs on each shift. The file is created for each calendar year. I have a template with all the info from each department saved in a "Setup" tab. For the last few years, I've had to do a find/replace exercise for 32 different names in each department in order to populate the basic rotation for the whole year. The template has the "name" spots labeled as "A1, A2, A3", "B1, B2, B3" from A1 through A8, B1 through B8, C1 through C8, and D1 through D8. What I'm looking to be able to do is enter the names next to a list of A1 through D8, and then use that to populate out to the week tabs. I'll try to explain this with the examples below.
I want to be able to set up the names like this on the setup tab (all the way down through D8):
Excel 2010
A | B | |
---|---|---|
22 | Shift spot | Name |
23 | A1 | Nasella |
24 | A2 | Krauss |
25 | A3 | Nardone |
26 | A4 | VanHorn |
27 | A5 | Kendrick |
28 | A6 | Wells |
29 | A7 | Gillespie |
30 | A8 | Boyer |
31 | B1 | McCant |
32 | B2 | Banta |
33 | B3 | Reed |
<tbody>
</tbody>
Setup
Excel 2010
A | B | C | D | E | F | G | H | |
---|---|---|---|---|---|---|---|---|
2 | Date | 12/24/2018 | 12/25/2018 | 12/26/2018 | 12/27/2018 | 12/28/2018 | 12/29/2018 | 12/30/2018 |
3 | Day | Monday | Tuesday | Wednesday | Thursday | Friday | Saturday | Sunday |
4 | Day Shift | D | D | B | B | D | D | D |
5 | Job 1 | D1 | D1 | B1 | B1 | D1 | D1 | D1 |
6 | Job 2 | D2 | D2 | B2 | B2 | D2 | D2 | D2 |
7 | Job 3 | D3 | D3 | B3 | B3 | D3 | D3 | D3 |
8 | Job 4 | D4 | D4 | B4 | B4 | D4 | D4 | D4 |
9 | Job 5 | D5 | D5 | B5 | B5 | D5 | D5 | D5 |
10 | Job 6 | D6 | D6 | B6 | B6 | D6 | D6 | D6 |
11 | Job 7 | D7 | D7 | B7 | B7 | D7 | D7 | D7 |
12 | Job 8 | D8 | D8 | B8 | B8 | D8 | D8 | D8 |
21 | Night Shift | C | C | A | A | C | C | C |
22 | Job 1 | C1 | C1 | A1 | A1 | C1 | C1 | C1 |
23 | Job 2 | C2 | C2 | A2 | A2 | C2 | C2 | C2 |
24 | Job 3 | C3 | C3 | A3 | A3 | C3 | C3 | C3 |
25 | Job 4 | C4 | C4 | A4 | A4 | C4 | C4 | C4 |
26 | Job 5 | C5 | C5 | A5 | A5 | C5 | C5 | C5 |
27 | Job 6 | C6 | C6 | A6 | A6 | C6 | C6 | C6 |
28 | Job 7 | C7 | C7 | A7 | A7 | C7 | C7 | C7 |
29 | Job 8 | C8 | C8 | A8 | A8 | C8 | C8 | C8 |
<tbody>
</tbody>
Dec 24 - Dec 30
So that it ends up like this:Excel 2010
A | B | C | D | E | F | G | H | |
---|---|---|---|---|---|---|---|---|
2 | Date | 12/24/2018 | 12/25/2018 | 12/26/2018 | 12/27/2018 | 12/28/2018 | 12/29/2018 | 12/30/2018 |
3 | Day | Monday | Tuesday | Wednesday | Thursday | Friday | Saturday | Sunday |
4 | Day Shift | D | D | B | B | D | D | D |
5 | Job 1 | Dantonio | Dantonio | McCant | McCant | Dantonio | Dantonio | Dantonio |
6 | Job 2 | McClure | McClure | Banta | Banta | McClure | McClure | McClure |
7 | Job 3 | Stahl | Stahl | Reed | Reed | Stahl | Stahl | Stahl |
8 | Job 4 | Hollis | Hollis | Repine | Repine | Hollis | Hollis | Hollis |
9 | Job 5 | Esslinger | Esslinger | Hatala | Hatala | Esslinger | Esslinger | Esslinger |
10 | Job 6 | Macielag | Macielag | Willis | Willis | Macielag | Macielag | Macielag |
11 | Job 7 | Phillips | Phillips | Draine | Draine | Phillips | Phillips | Phillips |
12 | Job 8 | Birney | Birney | Brosovich | Brosovich | Birney | Birney | Birney |
21 | Night Shift | C | C | A | A | C | C | C |
22 | Job 1 | Holmes | Holmes | Nasella | Nasella | Holmes | Holmes | Holmes |
23 | Job 2 | McMaster | McMaster | Krauss | Krauss | McMaster | McMaster | McMaster |
24 | Job 3 | Roccio | Roccio | Nardone | Nardone | Roccio | Roccio | Roccio |
25 | Job 4 | Donahue | Donahue | VanHorn | VanHorn | Donahue | Donahue | Donahue |
26 | Job 5 | Durbano | Durbano | Kendrick | Kendrick | Durbano | Durbano | Durbano |
27 | Job 6 | Ash | Ash | Wells | Wells | Ash | Ash | Ash |
28 | Job 7 | Reagan | Reagan | Gillespie | Gillespie | Reagan | Reagan | Reagan |
29 | Job 8 | Hubert | Hubert | Boyer | Boyer | Hubert | Hubert | Hubert |
<tbody>
</tbody>
Dec 24 - Dec 30
Thanks in advance for any help!