dcalderwood
New Member
- Joined
- Aug 25, 2020
- Messages
- 11
- Office Version
- 365
- Platform
- Windows
I have been searching and searching and I have found a lot of great formulas, but none of them get me quite where I want to be. I have a worksheet that has every project we are working listed, it includes:
Column C: Start Date - let's say 4/15/2023
Column D: Number of weeks to complete - let's say 12
Column E: Calculated end date - with the examples we would see 7/8/2023
Column F: Number of hours for each department - for example Project Management would have 35 in this column
Column G forward each have a date of the week start
Row 1 is the calculated weeknum value, I'm using that in my current formula, so end date really isn't necessary:
=IF(ISBLANK($D3),"",(($F4/$D3)*AND(L$1<=(WEEKNUM($C$3,1)+$D3))))
I want to be able to distribute the 35 PM hours across all of the weeks within the date range, but I don't want it to exceed the 35 hours. I have managed to get it to distribute evenly, but I need whole number hours, and if there are an off number of hours remaining I want it to show that. For instance, the above examples provides a value of 2.91666667 to each column. If I round to 3, I end up with 36 weeks. So what I would like for it to do is distribute 3 across, and then the final week would have 2 hours. I hope this makes sense and I hope you can help. Thank you so much!
Current Formula
Column C: Start Date - let's say 4/15/2023
Column D: Number of weeks to complete - let's say 12
Column E: Calculated end date - with the examples we would see 7/8/2023
Column F: Number of hours for each department - for example Project Management would have 35 in this column
Column G forward each have a date of the week start
Row 1 is the calculated weeknum value, I'm using that in my current formula, so end date really isn't necessary:
=IF(ISBLANK($D3),"",(($F4/$D3)*AND(L$1<=(WEEKNUM($C$3,1)+$D3))))
I want to be able to distribute the 35 PM hours across all of the weeks within the date range, but I don't want it to exceed the 35 hours. I have managed to get it to distribute evenly, but I need whole number hours, and if there are an off number of hours remaining I want it to show that. For instance, the above examples provides a value of 2.91666667 to each column. If I round to 3, I end up with 36 weeks. So what I would like for it to do is distribute 3 across, and then the final week would have 2 hours. I hope this makes sense and I hope you can help. Thank you so much!
Current Formula