Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Date formula resulting in Year, Months & days

I am trying to write a formula that calculates staff member's lenght of
service.

In column E I have their start dates with E1 containing =today()
eg. Row 3 has the following
E3 = 24/08/2004 F3 has the formula =(YEAR($E$1)-YEAR(E3)) returning 4.00. I
have checked the formating of decimal places & tried to use the ROUNDDOWN
function without success. As they have not yet been here 4 years the result
should be 3.85 - All of the results are rounding to the nearest whole number
(0.6 is showing as 1.0)

Ideally I would like column F to have number of full years then G to be full
months (in the above example 10 mths) & then H be days (in above 6) so I
have a complete number of years, months & days.

Any help appreciated.

Ryan
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,593
Default Date formula resulting in Year, Months & days

=DATEDIF(E3,E1,"Y")

=DATEDIF(E3,E1,"YM")

=DATEDIF(E3,E1,"MD")

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Ryan_Keys" wrote in message
...
I am trying to write a formula that calculates staff member's lenght of
service.

In column E I have their start dates with E1 containing =today()
eg. Row 3 has the following
E3 = 24/08/2004 F3 has the formula =(YEAR($E$1)-YEAR(E3)) returning 4.00.
I
have checked the formating of decimal places & tried to use the ROUNDDOWN
function without success. As they have not yet been here 4 years the
result
should be 3.85 - All of the results are rounding to the nearest whole
number
(0.6 is showing as 1.0)

Ideally I would like column F to have number of full years then G to be
full
months (in the above example 10 mths) & then H be days (in above 6) so I
have a complete number of years, months & days.

Any help appreciated.

Ryan



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,440
Default Date formula resulting in Year, Months & days

Hi Ryan,

Look he

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

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"Ryan_Keys" wrote in message ...
|I am trying to write a formula that calculates staff member's lenght of
| service.
|
| In column E I have their start dates with E1 containing =today()
| eg. Row 3 has the following
| E3 = 24/08/2004 F3 has the formula =(YEAR($E$1)-YEAR(E3)) returning 4.00. I
| have checked the formating of decimal places & tried to use the ROUNDDOWN
| function without success. As they have not yet been here 4 years the result
| should be 3.85 - All of the results are rounding to the nearest whole number
| (0.6 is showing as 1.0)
|
| Ideally I would like column F to have number of full years then G to be full
| months (in the above example 10 mths) & then H be days (in above 6) so I
| have a complete number of years, months & days.
|
| Any help appreciated.
|
| Ryan


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Date formula resulting in Year, Months & days

Brilliant - Just what I needed thanks a bunch!

"Bob Phillips" wrote:

=DATEDIF(E3,E1,"Y")

=DATEDIF(E3,E1,"YM")

=DATEDIF(E3,E1,"MD")

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Ryan_Keys" wrote in message
...
I am trying to write a formula that calculates staff member's lenght of
service.

In column E I have their start dates with E1 containing =today()
eg. Row 3 has the following
E3 = 24/08/2004 F3 has the formula =(YEAR($E$1)-YEAR(E3)) returning 4.00.
I
have checked the formating of decimal places & tried to use the ROUNDDOWN
function without success. As they have not yet been here 4 years the
result
should be 3.85 - All of the results are rounding to the nearest whole
number
(0.6 is showing as 1.0)

Ideally I would like column F to have number of full years then G to be
full
months (in the above example 10 mths) & then H be days (in above 6) so I
have a complete number of years, months & days.

Any help appreciated.

Ryan




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
add days to a date and return resulting date LKONITZ Excel Worksheet Functions 4 April 20th 08 02:45 AM
Year-Days-Months Steve Excel Worksheet Functions 10 September 3rd 06 07:05 AM
FORMULA FOR CALCULATING YEARS, DAYS, & MONTHS BETWEEN SEVERAL DATE Sam Excel Discussion (Misc queries) 3 June 28th 06 10:34 PM
i have two days and i want the difference in days, months, year maja Excel Worksheet Functions 7 April 22nd 06 01:14 AM
count number of months year to date coal_miner Excel Worksheet Functions 1 May 4th 05 02:41 PM


All times are GMT +1. The time now is 11:36 AM.

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"