Date calculation in Excel 2003

R

Richardcw

Is it possible to calculate the difference between two dates and return the
answer as yy-ddd. Thus, the difference between 1 Jan 2006 and 1 Feb 2007
would be 1-031.
 
C

Carim

Hi,

If your dates are in cell A1 and B1 :
=DATEDIF(A1,B1,"Y")&" "&DATEDIF(A1,B1,"D")-365

HTH
Cheers
Carim
 
S

Sandy Mann

Carim,

Your formula returns errors, as examples:

A1: 31/01/2006
B1: 01/03/2008
(British style dates dd/mm/yy)
Returns 2 395

A1: 31/06/2006
B1 01/03/2006
Returns 0 -366


I would suggest:

=DATEDIF(A1,B1,"y")&"Years "&DATEDIF(A1,B1,"yd")& " Days"

although DATEDIF() does have its own idiosyncrasies.

--
Regards,

Sandy
In Perth, the ancient capital of Scotland

[email protected]
[email protected] with @tiscali.co.uk
 
Top