mminchev

New Member
Joined
Feb 16, 2018
Messages
23
Hi I am trying to figure out a formula that would give me the average tenure per year of the Active employees for that year. I have a list of the employees with start and end dates and their Departments, and their tenure for each year they worked.

Here are the two lists: What I need is to get the Avg Tenure per year and Department based on the tenure under each year in the list to the right.

12/31/199512/31/199612/31/199712/31/1998
YearStart of YearEnd of YearDeptAvg TenureNameStart DateEnd DateTerm YearTerm AdjustDept1995199619971998
19971/1/199712/31/1997SalesBob1/8/19955/8/199719975/8/1997Sales1.02.02.3NA
19971/1/199712/31/1997HRLisa1/8/19979/8/199819989/8/1998AccountingNANA1.01.7
19971/1/199712/31/1997AccountingJon9/7/199720225/17/2022HRNANA0.31.3
19971/1/199712/31/1997FinanceIngrid4/8/19952/2/200020002/2/2000Merchandising0.71.72.73.7
19971/1/199712/31/1997MerchandisingVlad1/1/19973/15/199819983/15/1998Real EstateNANA1.01.2
19971/1/199712/31/1997Real EstateJessica9/8/199720225/17/2022SalesNANA0.31.3
19981/1/199812/31/1998SalesLoui11/8/199712/8/1998199812/8/1998SalesNANA0.11.1
19981/1/199812/31/1998HRJess12/10/199720225/17/2022FinanceNANA0.11.1
19981/1/199812/31/1998AccountingNora9/11/199820225/17/2022AccountingNANANA0.3
19981/1/199812/31/1998FinanceMike5/8/199712/31/1998199812/31/1998MerchandisingNANA0.61.6
19981/1/199812/31/1998MerchandisingMiles4/21/19976/9/199819986/9/1998SalesNANA0.71.1
19981/1/199812/31/1998Real Estate
Gordon1/2/199720225/17/2022HRNANA1.02.0
Joey6/7/199711/8/1998199811/8/1998Real EstateNANA0.61.4
Linda2/9/199820225/17/2022FinanceNANANA0.9
Barb3/3/19973/3/199819983/3/1998HRNANA0.8
1.0​
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
What version of Excel are you using?

I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)

Maybe
Excel Formula:
=AVERAGEIFS(INDEX($P$3:$S$17,,MATCH(YEAR(B3),$P$2:$S$2,0)),$O$3:$O$17,D3)
 
Upvote 0
Solution
What version of Excel are you using?

I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)

Maybe
Excel Formula:
=AVERAGEIFS(INDEX($P$3:$S$17,,MATCH(YEAR(B3),$P$2:$S$2,0)),$O$3:$O$17,D3)
This worked perfect!!!!!!!!!!!!
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,215,054
Messages
6,122,895
Members
449,097
Latest member
dbomb1414

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