Ok, this is evolving more and more complexity.
See attached for updates.
Now I added a few more helper formulas and adjusted existing helper formulas in AH32:AH34.
Instead of creating named ranges, I decided to use INDEX functions combined with INDIRECT() function ... which indirectly references a sheetname in a cell (AH32) for the next month. To get the sheetname I used formula in AH32:
Then I find what the last weekday in the current month is with formula in AH33:
The actual start and end dates formulas for the end dates remain the same except for the substituting of named ranges.
I added excess dates to go into next month in AH36:
And then we need to find the actual start date of the next month (in case the either the 1st or 2nd is a weekend)... so formula in AH37 is:
and similarly end date for next month in AH38:
and capacity from following month in AH39 is:
and capacity from current month and next month combined is in AH40:
and the final formula in W26 is updated to:
Hope it all works.
Bookmarks