View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Kim Kim is offline
external usenet poster
 
Posts: 284
Default Employee Length of Service

Thanks for the reply. Is there a way to show the result in years rather than
days or to use DATEDIF with an additional function (IF?) to use either TODAY
or the leave date?

"Pete_UK" wrote:

You could use the DATEDIF function to give you the difference between
two dates in years, months or days - take a look here on how to use
it:

http://www.cpearson.com/excel/datedif.aspx

A simple approach, to give you the difference in days, would be:

=IF(B1="",TODAY()-A1,B1-A1)

Format the cell as General or Number.

Hope this helps.

Pete

On Dec 22, 12:36 pm, Kim wrote:
Can anyone help please? I want to calculate employee length of service from
start date (A1) where there is a leave date (B1) or (B1) is blank and should
use TODAY as the reference date.