Sum total and Average of DateIf formula to calculate total time

JmeNola

New Member
Joined
Jan 23, 2018
Messages
2
Column A: Employee Name
Row 1: Column I: = TODAY()

Colum F:Start date: Actual date of hire
Column H: Total time in job: =DATEDIF(F4,$I$1,"Y")&" Years "&DATEDIF(F4,$I$1,"YM")&" Months "&DATEDIF(F4,$I$1,"MD")&" Days"

I need to sum the time for the employees from row 4 - 49 and take the average time in job.

then repeat for other job and create a graph for each job and highlight groups of employees with 0-6 months, 6 months - 1 year, 1 year - 2years..etc.

Can anyone help? I have the total time in the job calculated based on the formula above. not sure how to average the time among everyone or turn into a graph.
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
Where is the information on the jobs?

Average =AVERAGE(F4:F49)+1-I1 Gives the average in days
 
Upvote 0
If the hire date is in F4:F49 and your require the average for that range use the following

=I1-(AVERAGE(F4:F49)+1)

This yields the average number of days employed for that that range of personnel.

Ignore the formula in my first post.
 
Upvote 0
Where is the information on the jobs?

Average =AVERAGE(F4:F49)+1-I1 Gives the average in days

Thank you so much!

Is there a way to get the average back into Years, Months, and Days total. So if Employee A has 2 years and Employee B has 6 months, they would average to a total of 1.5 years on the job. Does that make sense?
 
Upvote 0

Excel 2010
ABCDEFGHIJK
1NameAverage time employed23-Jan-18656
21 Years 9 Months 16 Days
3
4A22-Jan-181
5B1-Jan-1822
6C1-Jan-151118
7D1-Jan-141483
8
4a
Cell Formulas
RangeFormula
K1=I1-(AVERAGE(F4:F51))
K4=$I$1-F4
K5=$I$1-F5
K6=$I$1-F6
K7=$I$1-F7
C2=DATEDIF(1,K1,"Y")&" Years "&DATEDIF(1,K1,"YM")&" Months "&DATEDIF(1,K1,"MD")&" Days"



The formula in C2 yields Text. If you want to do calculations with the average, you may want to start with average days.
 
Last edited:
Upvote 0
"
Is there a way to get the average back into Years, Months, and Days total. So if Employee A has 2 years and Employee B has 6 months, they would average to a total of 1.5 years on the job. Does that make sense?"

You could also consider YearFrac.


Excel 2010
CDEFGHIJK
1Average time employed23-Jan-18Days459.5
21 Years 3 Months 2 Days
31.2575341.258904
418-Jan-162.016438736
524-Jul-170.50137183
4a (2)
Cell Formulas
RangeFormula
K1=I1-(AVERAGE(F4:F49))
K4=$I$1-F4
K5=$I$1-F5
C2=DATEDIF(1,K1,"Y")&" Years "&DATEDIF(1,K1,"YM")&" Months "&DATEDIF(1,K1,"MD")&" Days"
C3=YEARFRAC(0,K1,3)
E3=AVERAGE(G4:G5)
G4=YEARFRAC(F4,$I$1,3)
G5=YEARFRAC(F5,$I$1,3)
 
Upvote 0

Forum statistics

Threads
1,214,919
Messages
6,122,260
Members
449,075
Latest member
staticfluids

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