ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Calculating Days Elasped (https://www.excelbanter.com/excel-discussion-misc-queries/230397-calculating-days-elasped.html)

Popey

Calculating Days Elasped
 
Hi

Hopefull this will be a simple task for somebody to help this simple Excel
user out :-)

In Cell A1 I have a set date (12 Apr 09).

In Cell B1 I would like to be displayed the time elasped in **y **m **d
(double digit years, months, days) since the date in A1 and today's date.

Any help would be greatly appreciated.

Thank you.

Ron Rosenfeld

Calculating Days Elasped
 
On Sun, 10 May 2009 08:11:01 -0700, Popey
wrote:

Hi

Hopefull this will be a simple task for somebody to help this simple Excel
user out :-)

In Cell A1 I have a set date (12 Apr 09).

In Cell B1 I would like to be displayed the time elasped in **y **m **d
(double digit years, months, days) since the date in A1 and today's date.

Any help would be greatly appreciated.

Thank you.


Since neither Years nor Months have a precisely defined number of days, you may
get unexpected answers.

However, this is one way that will work most of the time:

=DATEDIF(A1,TODAY(),"y") & " yrs " &
DATEDIF(A1,TODAY(),"ym") & " months " &
DATEDIF(A1,TODAY(),"md") & " days"

See http://www.cpearson.com/excel/datedif.aspx for documentation for the
DATEDIF function, which is only in Excel 2000 HELP, but is in most versions of
Excel since 97.
--ron

Mike H

Calculating Days Elasped
 
try

=DATEDIF(A1,TODAY(),"y")&" Y "&DATEDIF(A1,TODAY(),"ym")& " M
"&DATEDIF(A1,TODAY(),"md")&" d"

However you need to be aware that this can throw up odd results. Try this
day combination for example

31 Jan 1951
01 Mar 2008
which gives
57 years, 1 months, -1 days


Mike

"Popey" wrote:

Hi

Hopefull this will be a simple task for somebody to help this simple Excel
user out :-)

In Cell A1 I have a set date (12 Apr 09).

In Cell B1 I would like to be displayed the time elasped in **y **m **d
(double digit years, months, days) since the date in A1 and today's date.

Any help would be greatly appreciated.

Thank you.


Ron Rosenfeld

Calculating Days Elasped
 
On Sun, 10 May 2009 11:34:11 -0400, Ron Rosenfeld
wrote:

=DATEDIF(A1,TODAY(),"y") & " yrs " &
DATEDIF(A1,TODAY(),"ym") & " months " &
DATEDIF(A1,TODAY(),"md") & " days"


or, to more precisely comply with your request:

=DATEDIF(A1,TODAY(),"y") & " y " &
DATEDIF(A1,TODAY(),"ym") & " m " &
DATEDIF(A1,TODAY(),"md") & " d"
--ron

Popey

Calculating Days Elasped
 
Hi Mike H & Ron

Very many thanks for your quick and helpful replies. Both formulas did the
job. :-)

"Mike H" wrote:

try

=DATEDIF(A1,TODAY(),"y")&" Y "&DATEDIF(A1,TODAY(),"ym")& " M
"&DATEDIF(A1,TODAY(),"md")&" d"

However you need to be aware that this can throw up odd results. Try this
day combination for example

31 Jan 1951
01 Mar 2008
which gives
57 years, 1 months, -1 days


Mike

"Popey" wrote:

Hi

Hopefull this will be a simple task for somebody to help this simple Excel
user out :-)

In Cell A1 I have a set date (12 Apr 09).

In Cell B1 I would like to be displayed the time elasped in **y **m **d
(double digit years, months, days) since the date in A1 and today's date.

Any help would be greatly appreciated.

Thank you.



All times are GMT +1. The time now is 10:16 PM.

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