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
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
what version of excel are you using?

Do you have a typo in row 4 column 3?
 
Upvote 0
Upvote 0
try:
Book1
ABCDEFGHIJKL
1assignment # name start date end date2017201820192020202120222023
21 Darkwing Duck 2017-01-042018-03-04TRUETRUEFALSEFALSEFALSEFALSEFALSE
32 Darkwing Duck 2018-04-202019-05-20FALSETRUETRUEFALSEFALSEFALSEFALSE
43 Darkwing Duck 2019-06-102021-07-08FALSEFALSETRUETRUETRUEFALSEFALSE
54 Darkwing Duck 2022-08-042023-08-11FALSEFALSEFALSEFALSEFALSETRUETRUE
ulooz
Cell Formulas
RangeFormula
F2:L5F2=AND(F$1>=YEAR($C2),F$1<=YEAR($D2))
Thanks! It worked, but, only for those assignments with a tenure of less than two years. If an assignment has a tenure of 2 years or more it does not work. Sorry I should have included that scenario in my examples.
 
Upvote 0
Thanks! It worked, but, only for those assignments with a tenure of less than two years. If an assignment has a tenure of 2 years or more it does not work. Sorry I should have included that scenario in my examples.


Can you share some of those data examples?
And if at all possible try to post a mini workbook using the xl2bb add in (link below). This is what I used to post my suggestion above.
 
Upvote 0
Can you share some of those data examples?
And if at all possible try to post a mini workbook using the xl2bb add in (link below). This is what I used to post my suggestion above.
Sorry, you were correct... must have fat fingered the formula.

Next question - in order to roll this up in a pivot table or summary, (i.e. in 2018 there were 229 TRUE, in 2019 329 TRUE, etc...) I don't think a pivot can just do that, maybe a =countifs in a separate table?
 
Upvote 0
please post a sample of your data. If I guess at what it looks like it may be wrong and it will be a waste of both of our time.
Use the xl2bb or just post a table. And please update your profile with what version of excel you are using. Some solutions will not work in earlier versions.

Thanks in advance.
 
Upvote 0
@awoohaw - So i'm trying to summarize that "AM", for example, will count for 2020 and 2021, hopefully the end result will be what I mentioned in my post above, summarizing # of people TRUE within each respective year. Hope it hasn't been a waste of your time and appreciate the help regardless!

example.xlsx
ABCDEFGHIJKLM
12017201820192020202120222023
2Assignment #NameStart_DateEnd_DateMin StartMax End2017201820192020202120222023
31AM1/1/20208/31/20201/1/20205/31/2021FALSEFALSEFALSETRUETRUEFALSEFALSE
42AM1/1/202012/31/20201/1/20205/31/2021FALSEFALSEFALSETRUETRUEFALSEFALSE
53AM9/1/20205/31/20211/1/20205/31/2021FALSEFALSEFALSETRUETRUEFALSEFALSE
61AS6/1/20207/31/20203/6/20199/30/2023FALSEFALSETRUETRUETRUETRUETRUE
72AS3/6/201911/30/20203/6/20199/30/2023FALSEFALSETRUETRUETRUETRUETRUE
83AS3/16/20203/15/20223/6/20199/30/2023FALSEFALSETRUETRUETRUETRUETRUE
91AJ12/3/20182/28/201912/3/20182/28/2019FALSETRUETRUEFALSEFALSEFALSEFALSE
101AR8/19/20192/16/20208/19/201912/1/2023FALSEFALSETRUETRUETRUETRUETRUE
112AR2/17/20205/29/20208/19/201912/1/2023FALSEFALSETRUETRUETRUETRUETRUE
123AR7/29/202112/1/20238/19/201912/1/2023FALSEFALSETRUETRUETRUETRUETRUE
131AS10/1/20219/30/20233/6/20199/30/2023FALSEFALSETRUETRUETRUETRUETRUE
141AK8/8/201712/16/20188/8/20173/17/2020TRUETRUETRUETRUEFALSEFALSEFALSE
152AK12/17/20186/23/20198/8/20173/17/2020TRUETRUETRUETRUEFALSEFALSEFALSE
163AK6/24/20192/23/20208/8/20173/17/2020TRUETRUETRUETRUEFALSEFALSEFALSE
Sheet1
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($E3),G$1<=YEAR($F3))
 
Upvote 0
It won't be a waste, thanks for the mini worksheet. hang tight. If I don't come up with a solution, I'm pretty sure someone else will.
 
Upvote 0
Okay, I've looked trying to do a pivot chart. because your data is already essentially a cross tab, I can't figure it out. I'm sure there is a way to PIVOT it, but i'll try a different approach.
 
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