I'm getting ever so close to figuring things out with my Excel project, all thanks to the excellent help I've received here. Now I'm on to doing additional calculations based on set vacation days. So this is the jist of the workbook:
1. Calculate the last payday in any given month - this could be either a Tuesday, Wednesday, or Friday
Based on the above formula, I now have a "work period", basically the last payday from the previous month to the day prior to the last payday in the current month.
2. One person works every day in that "work period"
3. One person only works on Monday and Tuesday, and every other Sunday (Sunday must be an "even" WEEKNUM)
So far I've gotten these done. With the help of AliGW, I was able to figure out how many "working" Sundays are in that "work period". Now I'm stuck on figuring out the vacation days. These are set days for various events. The way they apply is:
a) For the one person working every possible day, ALWAYS subtract the amount of vacation days for that "work period"
b) For the person only working part of the time, ONLY subtract the vacation day if it happens to fall on one of their work days (Mon, Tues, or the Sunday they work)
The attached workbook has a list of the vacation days, and the current state of the calculations as I've done them. I have two questions:
1. Looking at the formula for the vacation days, I don't entirely understand why I had to do a +1 to get the correct number. I'm using NETWORKDAYS.INTL to filter things out based on the list of vacation days, and subtracting it from the total work days. But somewhere I am losing what's inclusive and what's exclusive in the date ranges and doing the +1 seems to fix that. If someone could explain that to me I would appreciate it.
2. How can I calculate when a vacation day falls on any of the workdays for Person 2 and only subtract those? If a vacation day falls on a day they're not working, it doesn't need to get subtracted.
I hope I explained this well enough. If not, please ask for clarifications and I will attempt to explain again, or in a different way, if possible.
Bookmarks