ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Date formula resulting in Year, Months & days (https://www.excelbanter.com/excel-worksheet-functions/193150-date-formula-resulting-year-months-days.html)

Ryan_Keys

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

Bob Phillips

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




Niek Otten

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



Ryan_Keys[_2_]

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






All times are GMT +1. The time now is 07:13 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com