Formula or VBA to breakdown total headcount and keep a running total

Pcianf

New Member
Joined
Oct 25, 2021
Messages
2
Office Version
  1. 365
Platform
  1. Windows
Hi Everyone

Looking for some assistance with either a formula or VBA code to do the following:

For simplicity, Sheet 1 contains 2 columns. Column H is 'Implementation Date and Column O is 'Dev Headcount'

Sheet 2 contains a chart spanning over 20 months.

What I am trying to do is build a headcount forecast based on new projects added to sheet 1. Each project takes roughly 7 months to implement and the headcount effort breakdown for each month is below

Month 1 3.0%
Month 2 14.0%
Month 3 17.0%
Month 4 21.5%
Month 5 21.0%
Month 6 17.5%
Month 7 6.0%

I need Sheet 2 to recognize when there is a new entry on Sheet 1. Further to that, I would need the total headcount to be broken down based on the Implementation date and the 7 months leading up to it based on the % breakdown above. I would need this continuously summed on the same row 19 Sold Capacity - BAU on Sheet 2 as more entries are added on Sheet 1.

Sample pictures are attached.

Let me know if you need any more info.

Sheet 1
1635217455376.png


Sheet 2
1635217489177.png
 

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.
Welcome to the MrExcel forum!

Try this:

Book2
HO
1
2
3target implementation datedev Headcount
412/1/202227
512/1/202278
611/1/202234
71/1/202321
8
Sheet1


Book2
ABCDEFGHIJKLMNOPQRS
1
23/1/20224/1/20225/1/20226/1/20227/1/20228/1/20229/1/202210/1/202211/1/202212/1/20221/1/20232/1/20233/1/20234/1/20235/1/20236/1/20237/1/20238/1/2023
3Headcount and Capacity
4Associates Per Department125125125125125125125125125125125125125125125125125125
5Business Days in the Month232122222123222122222220232023222123
6Available Capacity in Days287526252750275026252875275026252750275027502500287525002875275026252875
7Subtractions001.027.9121.1128.133.28532.51524.8259.9751.260000000
8Remaining Capacity
9Over/Under Dev FTE Equiv
10Sold Capacity - BAU
11
12
13
14Monthly breakdown
153%
1614%
1717%
1821.50%
1921%
2017.50%
216%
Sheet2
Cell Formulas
RangeFormula
B5:S5B5=NETWORKDAYS(B2,EOMONTH(B2,0))
B6:S6B6=B4*B5
B7:S7B7=SUM(IFERROR(INDEX($A$15:$A$21,8-MATCH(EOMONTH(Sheet1!$H$4:$H$20+0,0),EOMONTH(B$2,{0,1,2,3,4,5,6}),0))*Sheet1!$O$4:$O$20,0))


This only works in Excel 365, although I might be able to figure out something for earlier versions. Also, I have several questions about how the headcount is applied. Presumably the business days per month varies from your sheet due to holidays. But take a look and see if this is on the right track.
 
Upvote 0
Solution
Fantastic, this worked! I appreciate the help.

Thank you
 
Upvote 0
That was fun to figure out. Here's a slightly shorter version:

Excel Formula:
=SUM(IFERROR(INDEX($A$15:$A$21,8-MATCH(Sheet1!$H$4:$H$20,EDATE(B$2,{0,1,2,3,4,5,6}),0))*Sheet1!$O$4:$O$20,0))

Both versions require the dates in both tables to be the first of the month, although you can format them to just show the month/year.

Glad I could help! :cool:
 
Upvote 0

Forum statistics

Threads
1,214,832
Messages
6,121,850
Members
449,051
Latest member
excelquestion515

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