Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Paige
 
Posts: n/a
Default How do I subtract a date from a date for a sum of total years?

I am trying to calculate how many years an employee has worked. I have start
date and current date. What is the formula to return years worked?
  #2   Report Post  
Gary''s Student
 
Posts: n/a
Default How do I subtract a date from a date for a sum of total years?

If the current date is in A1 and the start date is in B1, then

=year(A1)-year(B1) formatted as general will return the number of years
worked.
--
Gary''s Student


"Paige" wrote:

I am trying to calculate how many years an employee has worked. I have start
date and current date. What is the formula to return years worked?

  #3   Report Post  
Roger Govier
 
Posts: n/a
Default How do I subtract a date from a date for a sum of total years?

Hi Paige

One way
=DATEDIF(Startdate,currentdate,"y") for years only
=DATEDIF(Startdate,currentdate,"m") for months only
=DATEDIF(Startdate,currentdate,"ym") for remaining months excluding whole years.

Assuming start date in A1, Current date in B1
=DATEDIF(A1,B1,"y")&" years "&DATEDIF(A1,B1,"ym")&" months"

You could make B1=TODAY() to always give the latest date if required.

Regards

Roger Govier


Paige wrote:
I am trying to calculate how many years an employee has worked. I have start
date and current date. What is the formula to return years worked?

  #4   Report Post  
hideki
 
Posts: n/a
Default How do I subtract a date from a date for a sum of total years?


You can use DATEDIF function

eg: DATEDIF(startDate, currentDate,"Y")


--
hideki
------------------------------------------------------------------------
hideki's Profile: http://www.excelforum.com/member.php...o&userid=18903
View this thread: http://www.excelforum.com/showthread...hreadid=479748

  #5   Report Post  
Dave Peterson
 
Posts: n/a
Default How do I subtract a date from a date for a sum of total years?

You can find lots of info at Chip Pearson's site:
http://www.cpearson.com/excel/datedif.htm

(=datedif() was only documented in xl2k's help.)



Paige wrote:

I am trying to calculate how many years an employee has worked. I have start
date and current date. What is the formula to return years worked?


--

Dave Peterson
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how do I subtract years and then divide crystal Charts and Charting in Excel 1 October 22nd 05 07:28 PM
search for latest date Sue Excel Worksheet Functions 2 August 2nd 05 11:09 PM
Trying to get the next date exactly 5 years ago.. Tsjah Excel Worksheet Functions 4 June 28th 05 05:43 PM
Subtotal of Subtotal displays Grand Total in wrong row Thomas Born Excel Worksheet Functions 5 January 6th 05 01:46 PM
How do I write a formula to subtract a # from a total ONLY if the. JP Excel Worksheet Functions 2 November 17th 04 12:32 AM


All times are GMT +1. The time now is 09:00 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"