PC Review


Reply
Thread Tools Rate Thread

Date formula resulting in Year, Months & days

 
 
Ryan_Keys
Guest
Posts: n/a
 
      30th Jun 2008
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 With Quote
 
 
 
 
Bob Phillips
Guest
Posts: n/a
 
      30th Jun 2008
=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" <(E-Mail Removed)> wrote in message
news:98217347-45F1-4F14-BC77-(E-Mail Removed)...
>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 With Quote
 
Niek Otten
Guest
Posts: n/a
 
      30th Jun 2008
Hi Ryan,

Look here:

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

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"Ryan_Keys" <(E-Mail Removed)> wrote in message news:98217347-45F1-4F14-BC77-(E-Mail Removed)...
|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 With Quote
 
Ryan_Keys
Guest
Posts: n/a
 
      30th Jun 2008
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" <(E-Mail Removed)> wrote in message
> news:98217347-45F1-4F14-BC77-(E-Mail Removed)...
> >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 With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Year-Days-Months =?Utf-8?B?U3RldmU=?= Microsoft Excel Worksheet Functions 10 3rd Sep 2006 07:05 AM
FORMULA FOR CALCULATING YEARS, DAYS, & MONTHS BETWEEN SEVERAL DATE =?Utf-8?B?U2Ft?= Microsoft Excel Misc 3 28th Jun 2006 10:34 PM
i have two days and i want the difference in days, months, year =?Utf-8?B?bWFqYQ==?= Microsoft Excel Worksheet Functions 7 22nd Apr 2006 01:14 AM
Re: How can I find DATEDIFF returning Year, Months & Days Dave Peterson Microsoft Excel Misc 0 3rd Sep 2004 01:49 PM
Arrays fields for the days of the 12 months of the year Mari Jackson. Microsoft Access Getting Started 1 31st Jul 2004 06:17 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:19 PM.