Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
PJS PJS is offline
external usenet poster
 
Posts: 23
Default Calculating time between mulitple dates

Question

Let's take for example a Hire-date of 10/16/06 in cell A2

=DATEDIF(A2,NOW(),"y")&" years "&DATEDIF(A2,NOW(),"ym")&" months "
and I get 2 years and 10 months

but now I have 3 dates... Hire-date, Term-date, Rehire-date
Is there a forumula that would calculate the years and months in between?

For example
Hire-date = 10/23/06
Term-date = 08/02/08
Rehire-date = 04/06/09

I was able to calculate the months using the forumula
=(DATEDIF(B3,C3,"M")+DATEDIF(D3,NOW(),"M")) = 25

but I am having some trouble changing the 25 into 2 years 1 month

Thanks,

PJS






  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,520
Default Calculating time between mulitple dates

Try
=INT((DATEDIF(B3,C3,"m")+DATEDIF(D3,TODAY(),"m"))/12) &" Years " &
MOD(DATEDIF(B3,C3,"m")+DATEDIF(D3,TODAY(),"m"),12) &" months"

If this post helps click Yes
---------------
Jacob Skaria


"PJS" wrote:

Question

Let's take for example a Hire-date of 10/16/06 in cell A2

=DATEDIF(A2,NOW(),"y")&" years "&DATEDIF(A2,NOW(),"ym")&" months "
and I get 2 years and 10 months

but now I have 3 dates... Hire-date, Term-date, Rehire-date
Is there a forumula that would calculate the years and months in between?

For example
Hire-date = 10/23/06
Term-date = 08/02/08
Rehire-date = 04/06/09

I was able to calculate the months using the forumula
=(DATEDIF(B3,C3,"M")+DATEDIF(D3,NOW(),"M")) = 25

but I am having some trouble changing the 25 into 2 years 1 month

Thanks,

PJS






  #3   Report Post  
Posted to microsoft.public.excel.misc
PJS PJS is offline
external usenet poster
 
Posts: 23
Default Calculating time between mulitple dates

Thanks Jacob Skaria, the forumla works...
but I neglected to mentioned that C3 and D3 (Term-date and Rehire-date) can
be null.... thus resulting in a NUM error...

"Jacob Skaria" wrote:

Try
=INT((DATEDIF(B3,C3,"m")+DATEDIF(D3,TODAY(),"m"))/12) &" Years " &
MOD(DATEDIF(B3,C3,"m")+DATEDIF(D3,TODAY(),"m"),12) &" months"

If this post helps click Yes
---------------
Jacob Skaria


"PJS" wrote:

Question

Let's take for example a Hire-date of 10/16/06 in cell A2

=DATEDIF(A2,NOW(),"y")&" years "&DATEDIF(A2,NOW(),"ym")&" months "
and I get 2 years and 10 months

but now I have 3 dates... Hire-date, Term-date, Rehire-date
Is there a forumula that would calculate the years and months in between?

For example
Hire-date = 10/23/06
Term-date = 08/02/08
Rehire-date = 04/06/09

I was able to calculate the months using the forumula
=(DATEDIF(B3,C3,"M")+DATEDIF(D3,NOW(),"M")) = 25

but I am having some trouble changing the 25 into 2 years 1 month

Thanks,

PJS






  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,520
Default Calculating time between mulitple dates

Try the below

=INT((DATEDIF(B3,IF(C3,C3,TODAY()),"m")+IF(D3,DATE DIF(D3,TODAY(),"m"),0))/12) &" Years " &
MOD(DATEDIF(B3,IF(C3,C3,TODAY()),"m")+IF(D3,DATEDI F(D3,TODAY(),"m"),0),12)
&" months"

If this post helps click Yes
---------------
Jacob Skaria


"PJS" wrote:

Thanks Jacob Skaria, the forumla works...
but I neglected to mentioned that C3 and D3 (Term-date and Rehire-date) can
be null.... thus resulting in a NUM error...

"Jacob Skaria" wrote:

Try
=INT((DATEDIF(B3,C3,"m")+DATEDIF(D3,TODAY(),"m"))/12) &" Years " &
MOD(DATEDIF(B3,C3,"m")+DATEDIF(D3,TODAY(),"m"),12) &" months"

If this post helps click Yes
---------------
Jacob Skaria


"PJS" wrote:

Question

Let's take for example a Hire-date of 10/16/06 in cell A2

=DATEDIF(A2,NOW(),"y")&" years "&DATEDIF(A2,NOW(),"ym")&" months "
and I get 2 years and 10 months

but now I have 3 dates... Hire-date, Term-date, Rehire-date
Is there a forumula that would calculate the years and months in between?

For example
Hire-date = 10/23/06
Term-date = 08/02/08
Rehire-date = 04/06/09

I was able to calculate the months using the forumula
=(DATEDIF(B3,C3,"M")+DATEDIF(D3,NOW(),"M")) = 25

but I am having some trouble changing the 25 into 2 years 1 month

Thanks,

PJS






  #5   Report Post  
Posted to microsoft.public.excel.misc
PJS PJS is offline
external usenet poster
 
Posts: 23
Default Calculating time between mulitple dates

Thanks Jacob, it is working!

"Jacob Skaria" wrote:

Try the below

=INT((DATEDIF(B3,IF(C3,C3,TODAY()),"m")+IF(D3,DATE DIF(D3,TODAY(),"m"),0))/12) &" Years " &
MOD(DATEDIF(B3,IF(C3,C3,TODAY()),"m")+IF(D3,DATEDI F(D3,TODAY(),"m"),0),12)
&" months"

If this post helps click Yes
---------------
Jacob Skaria


"PJS" wrote:

Thanks Jacob Skaria, the forumla works...
but I neglected to mentioned that C3 and D3 (Term-date and Rehire-date) can
be null.... thus resulting in a NUM error...

"Jacob Skaria" wrote:

Try
=INT((DATEDIF(B3,C3,"m")+DATEDIF(D3,TODAY(),"m"))/12) &" Years " &
MOD(DATEDIF(B3,C3,"m")+DATEDIF(D3,TODAY(),"m"),12) &" months"

If this post helps click Yes
---------------
Jacob Skaria


"PJS" wrote:

Question

Let's take for example a Hire-date of 10/16/06 in cell A2

=DATEDIF(A2,NOW(),"y")&" years "&DATEDIF(A2,NOW(),"ym")&" months "
and I get 2 years and 10 months

but now I have 3 dates... Hire-date, Term-date, Rehire-date
Is there a forumula that would calculate the years and months in between?

For example
Hire-date = 10/23/06
Term-date = 08/02/08
Rehire-date = 04/06/09

I was able to calculate the months using the forumula
=(DATEDIF(B3,C3,"M")+DATEDIF(D3,NOW(),"M")) = 25

but I am having some trouble changing the 25 into 2 years 1 month

Thanks,

PJS






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
Calculating time between two dates Sujith Excel Discussion (Misc queries) 2 February 6th 07 06:52 AM
Calculating time between two dates Sujith Excel Discussion (Misc queries) 1 January 19th 07 08:25 PM
Calculating time between two dates Gary''s Student Excel Discussion (Misc queries) 0 January 19th 07 08:13 PM
Calculating time differences across two (or more) dates jonewer Excel Discussion (Misc queries) 1 May 11th 06 10:22 AM
calculating time/dates differences fvglassman Excel Discussion (Misc queries) 3 June 22nd 05 11:10 PM


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