Function to calculate the Length of Service of an Employee

G

Grd

Hi there,

I have the Date Of Hire for my employees and I was wondering if there was a
built in function to give the the length the employee has been in the company
in whole years.

Any help would be greatly appreciated.

Tx
Suzanne
 
J

John C

=DATEDIF(A1,A2,"y")
Where A1= date of hire, and A2=date of reference (could be TODAY() for
example).
 
P

Pete_UK

If your hire date is in D2, try this:

=INT((TODAY()-D2)/365)

and then copy down.

This does not account for leap years - is that important to you?

Hope this helps.

Pete
 
V

Vivian Baker

Out of all the samples I have tried the one below is the only one I could get to work.

However, I am trying to calculating the years, months and days and was wondering if you have something for that?

Thanks
Vivian



Gr wrote:

Works thanks.=INT((TODAY()-D2)/365.25)I added the .
10-Nov-08

Works thanks
=INT((TODAY()-D2)/365.25
I added the .25 for leap year

:

Previous Posts In This Thread:

Function to calculate the Length of Service of an Employee
Hi there

I have the Date Of Hire for my employees and I was wondering if there was a
built in function to give the the length the employee has been in the company
in whole years

Any help would be greatly appreciated

T
Suzanne

=DATEDIF(A1,A2,"y")Where A1= date of hire, and A2=date of reference (could be
=DATEDIF(A1,A2,"y"
Where A1= date of hire, and A2=date of reference (could be TODAY() for
example)
--
** John C *
Please remember if your question is answered, to mark it answered :). It
helps everyone

:

RE: Function to calculate the Length of Service of an Employee
Tr

=DATEDIF(A1,TODAY(),"y"

Mik

:

Works thanks.=INT((TODAY()-D2)/365.25)I added the .
Works thanks
=INT((TODAY()-D2)/365.25
I added the .25 for leap year

:

Re: Function to calculate the Length of Service of an Employee
If your hire date is in D2, try this

=3DINT((TODAY()-D2)/365

and then copy down

This does not account for leap years - is that important to you

Hope this helps

Pet


pany

Re: Function to calculate the Length of Service of an Employee
Okay, thanks for the feedback

Pet

was
company

EggHeadCafe - Software Developer Portal of Choice
Insert Flash into PowerPoint 2007
http://www.eggheadcafe.com/tutorial...8-ad8faf77958f/insert-flash-into-powerpo.aspx
 
A

Ashish Mathur

Hi,

Use the datedif() function:

1. For years =datedif(start_date,end_date,"y"), say in cell B4
2. For months =datedif(start_date,end_date,"ym"), say in cell C4
3. For days =end_date-edate(start date,(b4*12)+C4)

Please note that I have not used DATEDIF(start_date,end_date,"md") to
compute the days because in some cases, the answer will be a negative number

--
Regards,

Ashish Mathur
Microsoft Excel MVP
www.ashishmathur.com

in message
news:[email protected]...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top