How to allocate project hours between specific dates using specific daily hour burn rates and including awkward calendar month start/end+holidays

Jeremy901

New Member
Joined
Jan 9, 2024
Messages
6
Office Version
  1. 365
Platform
  1. Windows
Hi,
I am trying to create a tricky formula and have come close twice but not exactly what I need, maybe you could help?

I have a quantity of hours (project) that needs to have a specific start and end date. Then that quantity of hours between specific dates needs to be spread across specific months.

1st problem- The months start and end dates aren't exactly as per the generic calendar so must be specified in a separate cell.

2nd problem- a value in a different cell defines how many hours can be burnt from the project total per day.

3rd problem- The formula must realise that Mon- Fri are full working days but Sat and Sunday are 1/4 of the full working day capacity/burn rate.

4th Problem- The formula must also recognise holidays when all operations are shutdown (typically 10days over Christmas period depending on calendar days and how they fall)

Example:
A project has a total of 7,700 hours. To be worked at full capacity Monday-Friday, 1/4 capacity Saturday and Sunday and excluding holiday shutdown (23/DEC/23 - 01/JAN/24).

The project start is 14/DEC/24 and the end date is 19/JAN/24 (7700 hrs must be spread between these dates according to the capacity burn on ITEM 3=330 hrs a day but must also account for the calendar start/ends as well as including holiday shutdown days(all seen in this message))

The capacity hours that can be burnt in a day are set values depending on which item type is being worked on. IF item 3=330hrs per day, item A=325, item 5=420, item 6=450 , item 8= 275 & item PL=100.

Calendar start end dates are as follows:
DEC start= 28/NOV/23.
DEC end= 31/DEC/23 (no working days from/to 23/12/23 - 01/01/2024, last day of work is 22nd DEC).
JAN start= 01/JAN/24 (no working days on the 01/JAN/24) so actual start is the 2nd JAN.
JAN end= 31/JAN/24.

Maybe you could suggest a formula for these parameters??

I've tried a couple of ways that seem to be almost correct but they are not 100% and I need better accuracy. For example I had two projects of 7,700 on item 3 (daily burn 330hrs) that start in December ( one on the 14-DEC and the other on the 17-DEC) and they both end on JAN 19th. However the hours allocated in January aren't the same because the formula I use breaks the total hours between months as a percentage of 100 so while January should be the same (because it has the same possible amount of days to burn daily hours) it is different because my formula spreads more hours into December due to the earlier start date.

I tried to attach a picture of this explanation but I cant paste into this message box or attach elsewhere. I'd be happy to have a video call to show visually if that helps.
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
1704961728228.png
1704961770934.png
1704961786086.png



The above is what I have been using. But as you can see networkintl formula accounts for 6 working days (function 11) when i need 5.5 a week (there's no function for decimals). & the thing that made me realise it wasn't correct was actually the two lower projects that have 7700 hours and end on the same day in January so therefore they should have the same hours allocated from the project in January as they run through the same days.
 
Upvote 0
First some questions:

  1. What do you mean by "start and end dates aren't exactly as per the generic calendar"? How do they look? You only show them for January.
  2. Where is the value that defines how many hours can be burned per day (problem 2). I don't see that value in your image.
  3. Where do you get the 7700 hours of your example from? Or is it just a value you enter in column "Hours"?
  4. Is the end date a day you are working on the project? Because if it is for your example (second data row, of 7700 hours starting 14-dec ending 19-jan) you have 27 days of work, not 26 as you show in you image.
  5. Where do you define what item type (IF item 3=330hrs per day, item A=325, item 5=420, item 6=450 , item 8= 275 & item PL=100) is worked on? I don't see that in your image.
  6. Adding all the hour you can work at a rate of 330 hours per day on weekday and 1/4*330 hours per weekend day and excluding the holidays mentioned I sum a total of 7425 hours (and that is including the day of the end date 19-Jan, which I'm not sure i should). So basically you are never going to finish your project of 7700 hours in that time frame.
 
Upvote 0
To calculate the hours burned by the project I did this:
I know that this isn't a solution to your problem, but are this number correct? If they are we can pack it all into a formula and filter it by month as you need, so you get the hours burned per month.

Cell Formulas
RangeFormula
Q3Q3=SUM(Q5:Q44)
N5N5=C6
O5:O44O5=WORKDAY.INTL(N5-1,1,"0000000",Holidays)=N5
P5:P41P5=0.25+0.75*(WEEKDAY(N5,2)<6)
N6:N44N6=N5+1
Q5:Q44Q5=$Q$1*P5*O5
Cells with Conditional Formatting
CellConditionCell FormatStop If True
N5:N44Expression=WEEKDAY(N5,2)>5textNO
 
Upvote 0
Firstly, thanks for your reply and time, I appreciate it. I have answered your questions as follows:

1.
1705058805981.png
[1]

2. I did not have that value built into my previous formulas.

The previous formula in my image was basically breaking the hours into a percentage and splitting that percentage across the months but as you see the two projects with 7700 hours were not being allocated the same amount in January because splitting a percentage doesn’t align with burnable days in the month.
1705058856371.png
[2]

To get the above figures in [2] (correct ones) I have made a calendar with each day’s burnable amount (as you have in your image) and am manually summing between start and end dates. When the project goes between more than one month, I am manually summing the correct project days from that calendar in that month. This takes time with many projects and is why I was trying to work out a formula so that I can just drag across the months in fig [1].

3. 7700 hours is the total hours of the project worked out in a different place and then its plugged into this spreadsheet to be seen spread through the calendar in fig [1] correctly.

NOTE: Sometimes the project hours may be more than the available hours in the calendar burn days as seen in fig [2] where the project needs 7700 but the calendar according to burn rates only has 7351 hours. This is where I can see where a project may exceed the predicted end date.

4. The start and end dates are working days. You’re correct that it should be 27 not 26. I have amended this as seen in fig [2]

5. Not part of my previous equation and I wasn’t sure how to do that in a formula. I assume IF functions, but I couldn’t get the hours spread right so I didn’t even go that far as to allocate the various item types.

6. See NOTE in answer 3. This is okay as an error either more or less due to the calendar burn rates. This is how I see when an project forecast is unlikely or more than likely to meet its estimated start/end dates. You can see in fig [2] that I have two columns of hours. The black font hours are forecasts (predictions) where as the green font hours next to that column is as you have worked out the available hours according to the burn rates on the calendar days.

NOTE: I have added 10% to the daily burns so the green font figures will be showing what you have done but 10% more. See fig [3] below:
1705058954192.png
 
Upvote 0
Thanks for your reply.
How about this?:
"Holidays" is a table.

Here is the file to download: ProjectHours.zip

ProjectHours.xlsx
CDEFGHIJKLMNOPQRSTUVWXYZ
1
201-12-202301-01-202401-02-202429-02-202404-04-202402-05-202430-05-202404-07-202401-08-202429-08-202403-10-202431-10-202428-11-202401-01-202501-02-202501-03-2025
331-12-202331-01-202428-02-202403-04-202401-05-202429-05-202403-07-202431-07-202428-08-202402-10-202430-10-202427-11-202431-12-202431-01-202528-02-202503-04-2025
4Working DaysBurn RateHour needed to complete the proyectForecast calculated hoursDec-23Jan-24Feb-24Mar-24Apr-24May-24Jun-24Jul-24Aug-24Sep-24Oct-24Nov-24Dec-24Jan-25Feb-25Mar-25Add new columns to the left of thisHolidays
53633012,878.09,405.03,960.05,445.0--------------23-12-2023
6273307,700.07,425.02,475.04,950.0--------------24-12-2023
7243307,700.06,682.51,732.54,950.0--------------25-12-2023
826-12-2023
927-12-2023
1028-12-2023
1129-12-2023
1230-12-2023
1331-12-2023
1401-01-2024
Sheet1
Cell Formulas
RangeFormula
I2:W2I2=H3+1
H5:W7H5=LET( projStart, $A5, projEnd, $B5, monthStart, H$2, monthEnd, H$3, projBurnRate, $D5, d, SEQUENCE(projEnd-projStart+1,, projStart), fd, FILTER(d, (d>=monthStart)*(d<=monthEnd)), isWorkDay, WORKDAY.INTL(fd-1,1,"0000000",Holidays)=fd, burnRate, (0.25+0.75*(WEEKDAY(fd,2)<6))*projBurnRate, IFERROR(SUM(isWorkDay*burnRate),0) )
C5:C7C5=NETWORKDAYS.INTL(A5,B5,"0000000",Holidays)
F5:F7F5=SUM(H5:X5)
 
Upvote 0
Well done you, looks perfect.

Quick question though and I assume its an easy one. I populated a different project that leaks into February to test if the numbers matched mine and February was incorrect. Is that because you've only made the burn rate calendar up to 22nd Jan 2024?
If so then If i complete the calendar for the entire 2024 and add holidays to the holidays table will all the months populate correctly as the three in your example have?
 
Upvote 0
It should work fine with any dates you entre in Start and End columns (being end > start).
Can you show me what you see and what result you are expecting?

If I set the end date of the second project to 19/02/2024 i'll get this:

ProjectHours.xlsx
ABCDEFGHIJKLMNOPQRSTUVWXYZ
1
201/12/202301/01/202401/02/202429/02/202404/04/202402/05/202430/05/202404/07/202401/08/202429/08/202403/10/202431/10/202428/11/202401/01/202501/02/202501/03/2025
331/12/202331/01/202428/02/202403/04/202401/05/202429/05/202403/07/202431/07/202428/08/202402/10/202430/10/202427/11/202431/12/202431/01/202528/02/202503/04/2025
4StartEndWorking DaysBurn RateHour needed to complete the proyectForecast calculated hoursDec-23Jan-24Feb-24Mar-24Apr-24May-24Jun-24Jul-24Aug-24Sep-24Oct-24Nov-24Dec-24Jan-25Feb-25Mar-25Add new columns to the left of thisHolidays
508/12/202322/01/20243633012,878.09,405.03,960.05,445.0--------------23/12/2023
614/12/202319/02/2024583307,700.015,180.02,475.07,920.04,785.0-------------24/12/2023
717/12/202319/01/2024243307,700.06,682.51,732.54,950.0--------------25/12/2023
826/12/2023
927/12/2023
1028/12/2023
1129/12/2023
1230/12/2023
1331/12/2023
1401/01/2024
Sheet1
Cell Formulas
RangeFormula
I2:W2I2=H3+1
H5:W7H5=LET( projStart, $A5, projEnd, $B5, monthStart, H$2, monthEnd, H$3, projBurnRate, $D5, d, SEQUENCE(projEnd-projStart+1,, projStart), fd, FILTER(d, (d>=monthStart)*(d<=monthEnd)), isWorkDay, WORKDAY.INTL(fd-1,1,"0000000",Holidays)=fd, burnRate, (0.25+0.75*(WEEKDAY(fd,2)<6))*projBurnRate, IFERROR(SUM(isWorkDay*burnRate),0) )
C5:C7C5=NETWORKDAYS.INTL(A5,B5,"0000000",Holidays)
F5:F7F5=SUM(H5:X5)


which seems correct adding manually the numbers in my control sheet:

ProjectHours.xlsx
KLMNOPQ
1From example330
2
315180
4DatesIs Working day?Burn rateHour burned per day
5Holidays2023/12/14 ThuTRUE1330
623/12/20232023/12/15 FriTRUE1330
724/12/20232023/12/16 SatTRUE0.2582.5
825/12/20232023/12/17 SunTRUE0.2582.5
926/12/20232023/12/18 MonTRUE1330
1027/12/20232023/12/19 TueTRUE1330
1128/12/20232023/12/20 WedTRUE1330
1229/12/20232023/12/21 ThuTRUE1330
1330/12/20232023/12/22 FriTRUE1330
1431/12/20232023/12/23 SatFALSE0.250
1501/01/20242023/12/24 SunFALSE0.250
162023/12/25 MonFALSE10
172023/12/26 TueFALSE10
182023/12/27 WedFALSE10
192023/12/28 ThuFALSE10
202023/12/29 FriFALSE10
212023/12/30 SatFALSE0.250
222023/12/31 SunFALSE0.250
232024/01/01 MonFALSE10
242024/01/02 TueTRUE1330
252024/01/03 WedTRUE1330
262024/01/04 ThuTRUE1330
272024/01/05 FriTRUE1330
282024/01/06 SatTRUE0.2582.5
292024/01/07 SunTRUE0.2582.5
302024/01/08 MonTRUE1330
312024/01/09 TueTRUE1330
322024/01/10 WedTRUE1330
332024/01/11 ThuTRUE1330
342024/01/12 FriTRUE1330
352024/01/13 SatTRUE0.2582.5
362024/01/14 SunTRUE0.2582.5
372024/01/15 MonTRUE1330
382024/01/16 TueTRUE1330
392024/01/17 WedTRUE1330
402024/01/18 ThuTRUE1330
412024/01/19 FriTRUE1330
422024/01/20 SatTRUE0.2582.5
432024/01/21 SunTRUE0.2582.5
442024/01/22 MonTRUE1330
452024/01/23 TueTRUE1330
462024/01/24 WedTRUE1330
472024/01/25 ThuTRUE1330
482024/01/26 FriTRUE1330
492024/01/27 SatTRUE0.2582.5
502024/01/28 SunTRUE0.2582.5
512024/01/29 MonTRUE1330
522024/01/30 TueTRUE1330
532024/01/31 WedTRUE1330
542024/02/01 ThuTRUE1330
552024/02/02 FriTRUE1330
562024/02/03 SatTRUE0.2582.5
572024/02/04 SunTRUE0.2582.5
582024/02/05 MonTRUE1330
592024/02/06 TueTRUE1330
602024/02/07 WedTRUE1330
612024/02/08 ThuTRUE1330
622024/02/09 FriTRUE1330
632024/02/10 SatTRUE0.2582.5
642024/02/11 SunTRUE0.2582.5
652024/02/12 MonTRUE1330
662024/02/13 TueTRUE1330
672024/02/14 WedTRUE1330
682024/02/15 ThuTRUE1330
692024/02/16 FriTRUE1330
702024/02/17 SatTRUE0.2582.5
712024/02/18 SunTRUE0.2582.5
722024/02/19 MonTRUE1330
732024/02/20 TueTRUE0
742024/02/21 WedTRUE0
Sheet1 (3)
Cell Formulas
RangeFormula
Q3Q3=SUM(Q5:Q74)
N5N5=C6
O5:O74O5=WORKDAY.INTL(N5-1,1,"0000000",Holidays34)=N5
P5:P72P5=0.25+0.75*(WEEKDAY(N5,2)<6)
N6:N74N6=N5+1
Q5:Q74Q5=$Q$1*P5*O5
Cells with Conditional Formatting
CellConditionCell FormatStop If True
N5:N74Expression=WEEKDAY(N5,2)>5textNO



Both give 15180 hours.
 
Upvote 0
Actually, I take it back. I've seen why February was more than I projected. Because I have bank holidays from February to November as 1/4 capacity too. So the dates in the below picture are also 1/4 capacity (excluding new years day which as mentioned before is 0 capacity:

1705070445139.png

So I think you have it solved completely according to my previous posts (I can tweek it to get the bank holidays as 1/4 capacity myself).

Any chance of setting up a video call one day and walking me through the coding of the formula to make sure I understand it correctly. Like is this a custom formula? I've never seen LET function used or your code function fd-1,1,"0000000",holidays) etc.
 
Upvote 0

Forum statistics

Threads
1,215,076
Messages
6,122,983
Members
449,092
Latest member
Mr Hughes

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top