Count of active employees between dates.

surkdidat

Well-known Member
Joined
Oct 1, 2011
Messages
597
Office Version
  1. 365
I am trying to work out the formula so I can count the number of employees that have started on or before the start date in column B, and have left on or after (or still employed, so blank) in column C for every month from June 2023 to June 2024 inclusive.
EmployeeIDHire DateTermination Date
Employee106/02/2023
Employee203/01/2023
Employee303/07/2023
Employee410/06/2024
Employee503/10/202219/10/2022
Employee604/11/202005/08/2022
Employee701/09/202209/05/2024
Employee810/10/202211/08/2023
Employee908/06/202222/12/2023
Employee1004/07/202211/09/2023



So for June 2023, 6 employees (Employees, 1 2 7 8 9 & 10) started on or before 1 June 2023, and were active on 30 June 2023 or after.
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
How about
Fluff.xlsm
ABCDEF
1EmployeeIDHire DateTermination Date
2Employee106/02/202301/06/20236
3Employee203/01/202301/07/20236
4Employee303/07/202301/08/20236
5Employee410/06/2024
6Employee503/10/202219/10/2022
7Employee604/11/202005/08/2022
8Employee701/09/202209/05/2024
9Employee810/10/202211/08/2023
10Employee908/06/202222/12/2023
11Employee1004/07/202211/09/2023
Data
Cell Formulas
RangeFormula
F2:F4F2=COUNTIFS(B:B,"<="&E2,C:C,">="&EOMONTH(E2,0))+COUNTIFS(B:B,"<="&E2,C:C,"")
 
Upvote 1
Solution
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,224,872
Messages
6,181,501
Members
453,047
Latest member
charlie_odd

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