Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default Seniority Years Formula needed

Does anyone know the formula for calculating a person seniority years

i tried subtracting the End Date from Start date / 365 but because of leap
years this does not accurately calculate. any ideas?

Hire Date Current Date =(B2-A2)/365
08/01/1908 07/23/2008 100.04

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default Seniority Years Formula needed

=DATEDIF(A1,B1,"y")
--
Gary''s Student - gsnu200796


"Roibn L Taylor" wrote:

Does anyone know the formula for calculating a person seniority years

i tried subtracting the End Date from Start date / 365 but because of leap
years this does not accurately calculate. any ideas?

Hire Date Current Date =(B2-A2)/365
08/01/1908 07/23/2008 100.04

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,358
Default Seniority Years Formula needed

Assumptions, hiredate and currentdate are dates only.

=IF(OR(hiredate="",currentdate=""),"",YEAR(current date)-YEAR(hiredate))

or, if you want to get a little fancier, in your example below, it should
actually be 99 whole years (a few days short of 100), you could use the
following formula:

=IF(OR(currentdate="",hiredate=""),"",YEAR(current date)-YEAR(hiredate)-IF(DATE(YEAR(2000),MONTH(currentdate),DAY(currentd ate))<DATE(YEAR(2000),MONTH(hiredate),DAY(hiredate )),1,0))

--
John C


"Roibn L Taylor" wrote:

Does anyone know the formula for calculating a person seniority years

i tried subtracting the End Date from Start date / 365 but because of leap
years this does not accurately calculate. any ideas?

Hire Date Current Date =(B2-A2)/365
08/01/1908 07/23/2008 100.04

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,316
Default Seniority Years Formula needed

Try the following formula, changing the cell references to match you worksheet:

=(B1-A1)/365.254
--
Kevin Backmann


"Gary''s Student" wrote:

=DATEDIF(A1,B1,"y")
--
Gary''s Student - gsnu200796


"Roibn L Taylor" wrote:

Does anyone know the formula for calculating a person seniority years

i tried subtracting the End Date from Start date / 365 but because of leap
years this does not accurately calculate. any ideas?

Hire Date Current Date =(B2-A2)/365
08/01/1908 07/23/2008 100.04

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,358
Default Seniority Years Formula needed

Don't forget to format your result cell as general, or it will show up as a
date.
--
John C


"Roibn L Taylor" wrote:

Does anyone know the formula for calculating a person seniority years

i tried subtracting the End Date from Start date / 365 but because of leap
years this does not accurately calculate. any ideas?

Hire Date Current Date =(B2-A2)/365
08/01/1908 07/23/2008 100.04



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default Seniority Years Formula needed

Thanks worked perfectly

"Gary''s Student" wrote:

=DATEDIF(A1,B1,"y")
--
Gary''s Student - gsnu200796


"Roibn L Taylor" wrote:

Does anyone know the formula for calculating a person seniority years

i tried subtracting the End Date from Start date / 365 but because of leap
years this does not accurately calculate. any ideas?

Hire Date Current Date =(B2-A2)/365
08/01/1908 07/23/2008 100.04

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
Scheduling staff to tasks based on seniority mattguerilla Excel Discussion (Misc queries) 0 March 20th 07 09:50 AM
How to allocate based on seniority Chunkey Pandey Excel Discussion (Misc queries) 6 November 24th 06 07:04 AM
How do I subtract dates to get a number in years or years & month jude Excel Discussion (Misc queries) 2 August 25th 06 08:02 PM
Recalc needed for successive years Mr Warwick Excel Discussion (Misc queries) 1 March 22nd 06 01:06 PM
Overlay 4 years of data as a line on 4 years of columns for several x category labels eMTee Charts and Charting in Excel 1 December 5th 05 12:32 PM


All times are GMT +1. The time now is 10:49 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"