Calculate Tenure with a Twist

mminchev

New Member
Joined
Feb 16, 2018
Messages
23
So I have two sheets. One sheet has my employee list with historic Start and End Dates. My other sheet is the summary of that list by Month. For example, lets say I have 10 Employees on my Employee sheet that all have Start and End dates, on my second sheet I have to summarize that info by Month and that includes showing Avg Tenure for all Employees that were at the company for that month.

Refer to the Image Below:

Please help I don't know why I cant figure this out, its one of those moments..... I really appreciate it!
 

Attachments

  • Practice.PNG
    Practice.PNG
    18.2 KB · Views: 25

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
Hi MMinchev,

Can you provide a worked example as it's not clear what you want.
  • Is the Jan to Dec for a specific year?
  • If so should tenure duration after that year/month be ignored?
  • Have all staff left (i.e. no End Date will be blank).
 
Upvote 0
MrExcel_Calculate Tenure with a Twist.xlsx
ABCDEF
1Emp NameStart DateEnd DateYearMonthAvg Tenure
2Joe05.01.200105.03.20012001Januar4,87096774
3Mimi05.05.200105.06.2001Februar7,71428571
4John01.01.200101.07.2001März5,93548387
5Velma03.02.200102.04.2001April3,23333333
6Scooby01.02.200114.06.2001Mai3,87096774
7Jojo01.01.200115.03.2001Juni2,63333333
8Mojo07.02.200105.09.2001Juli1,03225806
9Max10.12.200009.03.2001August1
10Maya15.11.200005.04.2001September0,16666667
11Oktober0
12November0
13Dezember0
14Januar
Sheet1
Cell Formulas
RangeFormula
F2:F13F2=SUM(IF($B$2:$B$10<E3,IF($C$2:$C$10>=E2,IF($C$2:$C$10<E3-1,$C$2:$C$10,E3-1)-IF($B$2:$B$10>E2,$B$2:$B$10,E2)+1,0),0))/(E3-E2)
E2:E14E2=DATE($D$2,ROW()-1,1)
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0
MrExcel_Calculate Tenure with a Twist.xlsx
ABCDEF
1Emp NameStart DateEnd DateYearMonthAvg Tenure
2Joe05.01.200105.03.20012001Januar4,87096774
3Mimi05.05.200105.06.2001Februar7,71428571
4John01.01.200101.07.2001März5,93548387
5Velma03.02.200102.04.2001April3,23333333
6Scooby01.02.200114.06.2001Mai3,87096774
7Jojo01.01.200115.03.2001Juni2,63333333
8Mojo07.02.200105.09.2001Juli1,03225806
9Max10.12.200009.03.2001August1
10Maya15.11.200005.04.2001September0,16666667
11Oktober0
12November0
13Dezember0
14Januar
Sheet1
Cell Formulas
RangeFormula
F2:F13F2=SUM(IF($B$2:$B$10<E3,IF($C$2:$C$10>=E2,IF($C$2:$C$10<E3-1,$C$2:$C$10,E3-1)-IF($B$2:$B$10>E2,$B$2:$B$10,E2)+1,0),0))/(E3-E2)
E2:E14E2=DATE($D$2,ROW()-1,1)
Press CTRL+SHIFT+ENTER to enter array formulas.
Hi Sulprobil,

I appreciate it, however is this calculating running Avg Tenure up until that month for all employees that were available up until that time, because I am not understanding the numbers. For example, for January you are showing 4.871 Avg Tenure, can you explain how many employees that Avg is looking at? Furthermore, wouldn't the Avg Tenure for January be 1.6? I am just confused and if you could walk me through it would be great! Thank you again so much for this work.
 
Upvote 0
Hello,
Mojo is the only employee who was there through all of August, so August tenure is 1.
Since Mojo was there only until 5-Sep, the September tenure is 5/30 = 0.166667.
In January you had Maja, Max, Jojo, and John throughout the whole month which makes 4. Since Joe was there only from 5-Jan onwards you can add only 1-4/31 = 0.87096774. Which totals to 4.87096774 for January.
Regards,
Bernd
 
Upvote 0
Solution

Forum statistics

Threads
1,224,817
Messages
6,181,149
Members
453,021
Latest member
Justyna P

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