I'm wanting to build a scheduling tool in Excel for my employees that work 4 days on, 4 days off. I have my year, month, and employees in column A. In row 1, I have the # of days of the month (For example, 1 - 31 for January). In row 2 I have the days of the week that corresponds to the number in row 1.
My ultimate goal is to find some formulas that will allow me to copy and paste rows 1 - X (where X is the row detailing the last employee), change the month, and have those pasted formulas look at the prior month, see where the prior month's rotation ended, and then start it again.
For example, if I have January with a single employee that worked 1/6 - 1/9, 1/14-1/17, 1/22-1/25, and 1/30 - 1/31, I want to be able use a formula that will see that the last two days of the prior month were worked, so the first two days of February should be worked.
I know I can do an insanely long formula saying "If 31, 30, 29, and 28 = Worked, pull 'off', if 31, 30, 29 = Worked but 28 = "off", pull "work", etc. On top of this, I'm running into the complication of referencing the last day of each month. Per my prior formula example, I would need to add in a "if the 31st exists, pull all this criteria, if not, see if the 30th exists and if so, pull all this criteria, if not, see if the 29th exists and if so, pull all this criteria, and if not, see if the 28th exists and if so, pull all this criteria".
Hopefully that makes sense, and I appreciate your help!
My ultimate goal is to find some formulas that will allow me to copy and paste rows 1 - X (where X is the row detailing the last employee), change the month, and have those pasted formulas look at the prior month, see where the prior month's rotation ended, and then start it again.
For example, if I have January with a single employee that worked 1/6 - 1/9, 1/14-1/17, 1/22-1/25, and 1/30 - 1/31, I want to be able use a formula that will see that the last two days of the prior month were worked, so the first two days of February should be worked.
I know I can do an insanely long formula saying "If 31, 30, 29, and 28 = Worked, pull 'off', if 31, 30, 29 = Worked but 28 = "off", pull "work", etc. On top of this, I'm running into the complication of referencing the last day of each month. Per my prior formula example, I would need to add in a "if the 31st exists, pull all this criteria, if not, see if the 30th exists and if so, pull all this criteria, if not, see if the 29th exists and if so, pull all this criteria, and if not, see if the 28th exists and if so, pull all this criteria".
Hopefully that makes sense, and I appreciate your help!