OK, try the attached out. It doesn't need a record for EVERY day used, just those that are holidays. I've also heavily annotated the function including putting in messages to show what it is doing as the function does them.
I've avoided using DateDiff and just treated the dates as numbers. This tends to avoid some.... issues... from what I'm seeing. It can also be rather easily modified if your "week" doesn't begin on Sunday of if you want to skip the whole "Weekends off" bit.
I've avoided using DateDiff and just treated the dates as numbers. This tends to avoid some.... issues... from what I'm seeing. It can also be rather easily modified if your "week" doesn't begin on Sunday of if you want to skip the whole "Weekends off" bit.