Wolfgang17
Board Regular
- Joined
- Nov 8, 2010
- Messages
- 63
How can I get the formula to start on the 2nd Monday in the 28 day rotation instead of defaulting to the first Monday, as is the case for April and other months. Is there another function I should use to find first empty cell from row above. if so how would I modify the original formula?
Any help would be appreciated.
Shift Rotation-Test.xlsx | |||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | AA | AB | AC | |||
1 | 2024 | 12 HOUR SHIFT SCHEDULE | |||||||||||||||||||||||||||||
2 | |||||||||||||||||||||||||||||||
3 | M | T | W | T | F | S | S | M | T | W | T | F | S | S | M | T | W | T | F | S | S | M | T | W | T | F | S | S | |||
4 | 0600 | Crew 4 | 3 | 2 | 1 | 4 | 3 | 2 | 1 | 4 | 3 | 2 | 1 | ||||||||||||||||||
5 | 1800 | Crew 2 | 1 | P | 4 | 3 | 2 | 1 | 4 | 3 | P | 2 | 1 | 4 | 3 | ||||||||||||||||
6 | OFF | Crew 3 | 2 | A | 1 | 4 | 3 | 2 | 1 | 4 | A | 3 | 2 | 1 | 4 | ||||||||||||||||
7 | ON CALL | Crew 1 | 4 | Y | 3 | 2 | 1 | 4 | 3 | 2 | Y | 1 | 4 | 3 | 2 | ||||||||||||||||
8 | January 2024 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | ||
9 | 29 | 30 | 31 | ||||||||||||||||||||||||||||
10 | February 2024 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | |||||
11 | 26 | 27 | 28 | 29 | |||||||||||||||||||||||||||
12 | March 2024 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | ||||||
13 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | ||||||||||||||||||||||||
14 | April 2024 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | ||
15 | 29 | 30 | |||||||||||||||||||||||||||||
Shift Rotation |
Cell Formulas | ||
---|---|---|
Range | Formula | |
A4 | A4 | ="0600" |
A8 | A8 | =DATE($A$1,1,1) |
B8:AC15 | B8 | =IF($A8="",IF(MONTH($AC7+COLUMNS($B8:B8))=MONTH($AC7),$AC7+COLUMNS($B8:B8),""),IF(WEEKDAY($A8,2)=COLUMNS($B8:B8),$A8,IF(COLUMNS($B8:B8)=1,"",IF(A8<>"",A8+1,"")))) |
A10,A14,A12 | A10 | =DATE(YEAR(A8),MONTH(A8)+1,1) |
Press CTRL+SHIFT+ENTER to enter array formulas. |
Any help would be appreciated.