Calculating Years/Months/Days when subtracting one date from another

  • Thread starter Thread starter robertguy
  • Start date Start date
R

robertguy

Hi

can anyone help me please to write a formula/macro which will :-

Calculate Years/Months/Days when subtracting one date from another

i.e.

10/03/2004
10/09/2003

= 0 years 6 months 0 days


Any help would be greatly received


Thanks


Ro
 
Hi Robert!

Try:
=DATEDIF(A1,B1,"y") & " y " & DATEDIF(A1,B1,"ym") & " m " &
DATEDIF(A1,B1,"md") & " d"



(But note that this will produce some strange responses and sequence
interpretation difficulties due to the lack of a consistent definition
of a month).


If you need consistency and easily interpretable comparative output,
then you need to pick (eg) Years and Weeks.
--
Regards
Norman Harker MVP (Excel)
Sydney, Australia
(e-mail address removed)
Excel and Word Function Lists (Classifications, Syntax and Arguments)
available free to good homes.
 
Back
Top