Formula Help: Count Number of candidates that worked within a month and year

Magoosball

Board Regular
Joined
Jun 4, 2017
Messages
70
Office Version
  1. 365
I have 2 Excel Tables
Image 1: Lists off each Month and Year
Image 2: Lists off working employees with start and end dates

On Image 1 there is a blank column for "Number Working on Assignment". I'm looking to write a formula here that shows the number of candidates that worked at least 1 day (Inclusive) in the month / year listed on the left of image 1. The employee start and end dates are listed in a separate table and I included in image 2.
Once note ---- the candidate ID column in image 2 isn't unique. a candidate can have multiple start and end dates.

I have Excel 365 and can add any helper columns that are needed... Thank you so much for your help.
 

Attachments

  • Image1.PNG
    Image1.PNG
    35.2 KB · Views: 11
  • Image 2.PNG
    Image 2.PNG
    36.8 KB · Views: 10

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
I'm not sure I understand, but:

Book1
ABCDEFGHI
1YearMonthNumber workingCandidate IDStartEnd
22020January3111/1/20193/2/2020
32020February416/1/20201/15/2021
42020March516/1/20215/1/2022
52020April422/1/202012/1/2020
62020May529/1/202112/25/2021
72020June629/1/20225/3/2023
82020July5310/1/201910/15/2021
92020August532/15/20226/15/2022
102020September645/1/20203/1/2021
112020October6411/30/20213/25/2022
122020November6411/30/20223/1/2023
132020December5512/30/20191/13/2022
142021January562/29/20206/30/2020
152021February469/29/20205/15/2021
162021March369/29/20218/29/2022
172021April3
182021May3
192021June3
202021July3
212021August3
222021September5
232021October5
242021November4
252021December5
262022January4
272022February4
282022March4
292022April3
302022May2
312022June2
322022July1
332022August1
342022September1
352022October1
362022November1
372022December2
382023January2
392023February2
402023March1
412023April1
422023May1
432023June0
442023July0
452023August0
462023September0
472023October0
482023November0
492023December0
Sheet1
Cell Formulas
RangeFormula
C2:C49C2=LET(d,DATEVALUE(B2:B49&"1, "&A2:A49),a,(EOMONTH(d,0)>TRANSPOSE(H2:H16))*(d<TRANSPOSE(I2:I16)),b,SEQUENCE(COLUMNS(a),1,1,0),MMULT(a,b))
Dynamic array formulas.
 
Upvote 0
Solution
I'm not sure I understand, but:

Book1
ABCDEFGHI
1YearMonthNumber workingCandidate IDStartEnd
22020January3111/1/20193/2/2020
32020February416/1/20201/15/2021
42020March516/1/20215/1/2022
52020April422/1/202012/1/2020
62020May529/1/202112/25/2021
72020June629/1/20225/3/2023
82020July5310/1/201910/15/2021
92020August532/15/20226/15/2022
102020September645/1/20203/1/2021
112020October6411/30/20213/25/2022
122020November6411/30/20223/1/2023
132020December5512/30/20191/13/2022
142021January562/29/20206/30/2020
152021February469/29/20205/15/2021
162021March369/29/20218/29/2022
172021April3
182021May3
192021June3
202021July3
212021August3
222021September5
232021October5
242021November4
252021December5
262022January4
272022February4
282022March4
292022April3
302022May2
312022June2
322022July1
332022August1
342022September1
352022October1
362022November1
372022December2
382023January2
392023February2
402023March1
412023April1
422023May1
432023June0
442023July0
452023August0
462023September0
472023October0
482023November0
492023December0
Sheet1
Cell Formulas
RangeFormula
C2:C49C2=LET(d,DATEVALUE(B2:B49&"1, "&A2:A49),a,(EOMONTH(d,0)>TRANSPOSE(H2:H16))*(d<TRANSPOSE(I2:I16)),b,SEQUENCE(COLUMNS(a),1,1,0),MMULT(a,b))
Dynamic array formulas.
this is exactly what I was looing for. thank you very much!
 
Upvote 0

Forum statistics

Threads
1,223,275
Messages
6,171,123
Members
452,381
Latest member
Nova88

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