Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / September 2006

Tip: Looking for answers? Try searching our database.

Use Datedif but for future dates

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
bam - 01 Sep 2006 20:09 GMT
I have a formula for identifying years, months, days from a past date to
now. DATEDIF(C6,NOW(),"y")&" Y, "& DATEDIF(C6,NOW(),"ym")& " M, " &
DATEDIF(C6,NOW(),"md") & " D"

I'd like a formula that can produce the same format (years, months, days)
between now and a future date.

Any ideas?

Thanks in advance,

Bart
Ron de Bruin - 01 Sep 2006 20:54 GMT
Hi Bart

Try this with the date in A2

=IF(TODAY()<=A2,DATEDIF(TODAY(),A2,"Y") & " y " & DATEDIF(TODAY(),A2,"ym") & " m","-"&DATEDIF(A2,TODAY(),"y")& " y "
&DATEDIF(A2,TODAY(),"ym")& " m")

Signature

Regards Ron de Bruin
http://www.rondebruin.nl

>I have a formula for identifying years, months, days from a past date to now. DATEDIF(C6,NOW(),"y")&" Y, "& DATEDIF(C6,NOW(),"ym")&
>" M, " & DATEDIF(C6,NOW(),"md") & " D"
[quoted text clipped - 6 lines]
>
> Bart
Ron de Bruin - 01 Sep 2006 20:56 GMT
Oops, This is the correct one for YMD

=IF(TODAY()<=A2,DATEDIF(TODAY(),A2,"y") & " y " & DATEDIF(TODAY(),A2,"ym") & " m " & DATEDIF(TODAY(),A2,"md") & "
d","-"&DATEDIF(A2,TODAY(),"y") & " y " &DATEDIF(A2,TODAY(),"ym") & " m "  &DATEDIF(A2,TODAY(),"md") & " d ")

Signature

Regards Ron de Bruin
http://www.rondebruin.nl

>I have a formula for identifying years, months, days from a past date to now. DATEDIF(C6,NOW(),"y")&" Y, "& DATEDIF(C6,NOW(),"ym")&
>" M, " & DATEDIF(C6,NOW(),"md") & " D"
[quoted text clipped - 6 lines]
>
> Bart
bam - 01 Sep 2006 21:06 GMT
Wow, nice. That does it. Thanks very much
Bart

> Oops, This is the correct one for YMD
>
[quoted text clipped - 14 lines]
>>
>> Bart
Gord Dibben - 01 Sep 2006 21:13 GMT
Swap your references around.

DATEDIF(NOW(),C6,  etc.

Earliest date must be first.

Gord Dibben  MS Excel MVP

>I have a formula for identifying years, months, days from a past date to
>now. DATEDIF(C6,NOW(),"y")&" Y, "& DATEDIF(C6,NOW(),"ym")& " M, " &
[quoted text clipped - 8 lines]
>
>Bart

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.