Counting the Number of Employees at Start and End of Month

Jehovahthicness

New Member
Joined
Aug 25, 2022
Messages
1
Office Version
  1. 365
Platform
  1. Windows
Hi Excel forum, I need help counting the number of employees at the start and end of each month. I have the Start Date and End Date in the attached sheet. I would need to fill out the information correctly on the second tab of the sheet, but I can't quite get the calculations correct.

1661461194334.png




Second Tab format:
1661461270797.png
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
Welcome to the MrExcel board!

This would likely attract more potential helpers as it would save a lot of manual typing to test. :)
MrExcel has a tool called “XL2BB” that lets you post samples of your data that will allow us to copy/paste it to our Excel spreadsheets, so we can work with the same copy of data that you are. Instructions on using this tool can be found here: XL2BB Add-in

Note that there is also a "Test Here” forum on this board. This is a place where you can test using this tool (or any other posting techniques that you want to test) before trying to use those tools in your actual posts.
 
Upvote 0
Book1
ABC
1TitleStart dateEnd date
2A06/01/201807/12/2019
3B06/05/201805/04/2020
4C15/07/201914/06/2021
5D27/01/202027/12/2021
6E26/05/202026/04/2022
7F24/06/202025/05/2022
8G15/08/201515/07/2017
9H06/06/201906/05/2021
Sheet1
Cell Formulas
RangeFormula
C2:C9C2=B2+700


Book1
ABCD
12021StartingEnd
2January55
3February55
4March55
5April55
6May54
7Jun43
8July33
9August33
10September33
11October33
12November33
13December32
142022StartingEnd
15January22
16February22
17March22
18April21
19May10
20Jun00
21July00
22August00
23September00
24October00
25November00
26December00
Sheet2
Cell Formulas
RangeFormula
C15:C26,C2:C13C2=COUNTIFS(Sheet1!$B$2:$B$9,"<=" & DATE(LOOKUP(2,1/($A$1:$A1<>""),$A$1:$A1),MONTH(DATEVALUE(1&$B2)),1),Sheet1!$C$2:$C$9,">=" &DATE(LOOKUP(2,1/($A$1:$A1<>""),$A$1:$A1),MONTH(DATEVALUE(1&$B2)),1))
D15:D26,D2:D13D2=COUNTIFS(Sheet1!$B$2:$B$9,"<=" & EOMONTH(DATE(LOOKUP(2,1/($A$1:$A1<>""),$A$1:$A1),MONTH(DATEVALUE(1&$B2)),1),0),Sheet1!$C$2:$C$9,">=" &EOMONTH(DATE(LOOKUP(2,1/($A$1:$A1<>""),$A$1:$A1),MONTH(DATEVALUE(1&$B2)),1),0))
 
Upvote 0

Forum statistics

Threads
1,214,619
Messages
6,120,550
Members
448,970
Latest member
kennimack

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