year by year headcount snapshot with only start and end date

ulooz

New Member
Joined
Nov 18, 2014
Messages
14
Office Version
  1. 365
Platform
  1. Windows
client would like "year by year snapshot" of headcount within company, assume that even if the start and end date was 1/2/2019 - 1/2/2020 that the person would count for 2019 and 2020. In the below example, i would need to summarize this contractor as counting for each 2017,2018,2019,2020,2021,2022 and 2023.

the data looks like this:

assignment # | name | start date | end date
1 | Darkwing Duck | 1/4/2017 | 3/4/2018
2 | Darkwing Duck | 4/20/2018 | 5/20/2019
3 | Darkwing Duck | 6/10/2019 | 7/8/2021
4 | Darkwing Duck | 8/4/20222 | 8/11/2023
 
This is what I've come up with:
Mr excel questions 41.xlsm
ABCDEFGHIJKLM
12017201820192020202120222023
2Assignment #NameStart_DateEnd_DateMin StartMax End2017201820192020202120222023
31AM2020-01-012020-08-312020-01-012021-05-310001000
42AM2020-01-012020-12-312020-01-012021-05-310001000
53AM2020-09-012021-05-312020-01-012021-05-310001100
61AS2020-06-012020-07-312019-03-062023-09-300001000
72AS2019-03-062020-11-302019-03-062023-09-300011000
83AS2020-03-162022-03-152019-03-062023-09-300001110
91AJ2018-12-032019-02-282018-12-032019-02-280110000
101AR2019-08-192020-02-162019-08-192023-12-010011000
112AR2020-02-172020-05-292019-08-192023-12-010001000
123AR2021-07-292023-12-012019-08-192023-12-010000111
131AS2021-10-012023-09-302019-03-062023-09-300000111
141AK2017-08-082018-12-162017-08-082020-02-231100000
152AK2018-12-172019-06-232017-08-082020-02-230110000
163AK2019-06-242020-02-232017-08-082020-02-230011000
17
18Yearly Total
1920171
2020183
2120195
2220209
2320214
2420223
2520232
26
Sheet4
Cell Formulas
RangeFormula
E3:E16E3=MINIFS(C:C,B:B,B3)
F3:F16F3=MAXIFS(D:D,B:B,B3)
G3:M16G3=(--(AND(G$1>=YEAR($C3),G$1<=YEAR($D3))))
B19:B25B19=SUM(INDEX($G$3:$M$16,0,XMATCH(A19,$G$2:$M$2)))
 
Upvote 0

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
try this to filter by name:

Mr excel questions 41.xlsm
ABCDEFGHIJKLM
12017201820192020202120222023
2Assignment #NameStart_DateEnd_DateMin StartMax End2017201820192020202120222023
31AM2020-01-012020-08-312020-01-012021-05-310001100
42AM2020-01-012020-12-312020-01-012021-05-310001100
53AM2020-09-012021-05-312020-01-012021-05-310001100
61AS2020-06-012020-07-312019-03-062023-09-300011111
72AS2019-03-062020-11-302019-03-062023-09-300011111
83AS2020-03-162022-03-152019-03-062023-09-300011111
91AJ2018-12-032019-02-282018-12-032019-02-280110000
101AR2019-08-192020-02-162019-08-192023-12-010011111
112AR2020-02-172020-05-292019-08-192023-12-010011111
123AR2021-07-292023-12-012019-08-192023-12-010011111
131AS2021-10-012023-09-302019-03-062023-09-300011111
141AK2017-08-082018-12-162017-08-082020-02-231111000
152AK2018-12-172019-06-232017-08-082020-02-231111000
163AK2019-06-242020-02-232017-08-082020-02-231111000
17
18NameAM
19Yearly Total
2020170
2120180
2220190
2320203
2420213
2520220
2620230
27
Sheet4
Cell Formulas
RangeFormula
E3:E16E3=MINIFS($C$3:$C$16,$B$3:$B$16,B3)
F3:F16F3=MAXIFS($D$3:$D$16,$B$3:$B$16,B3)
G3:M16G3=(--(AND(G$1>=YEAR($E3),G$1<=YEAR($F3))))
B20:B26B20=SUM(CHOOSECOLS(FILTER($A$3:$M$16,$B$3:$B$16=$B$18),MATCH(A20,$A$2:$M$2,0)))
 
Upvote 0

Forum statistics

Threads
1,223,234
Messages
6,170,891
Members
452,366
Latest member
TePunaBloke

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