calculate year and month

G

Guest

I have a start date and an end date. I want to show the number of years and
months between these two dates. (i.e. from 8/9/05 to 2/1/07 it would show 1
yr 6 mos)
 
G

Guest

Hi,

Try this:

=DATEDIF(start_date,end_date,"y")&IF(DATEDIF(start_date,end_dated,"y")>1,"
years "," year
")&DATEDIF(start_date,end_date,"ym")&IF(DATEDIF(start_date,end_date,"ym")>1,"
months "," month")

HTH
Jean-Guy
 
G

Guest

Use the DATDIF() function. If the dates are in A1 and A2 then:
=DATEDIF(A1,A2,"y")&" years, "&DATEDIF(A1,A2,"ym")&" months"
will display:
1 years, 5 months
 
G

Guest

Or, you can do =days360(A2,B2,FALSE)
Assuming A2 is the start and B2 is the end.
May need to add Analysis ToolPak from the Tools/AddIns option.
 
G

Guest

Hi Michelle

Yes you can, the argument for the days within a year is "yd" so just add a
formula with that argument at the end.

HTH
Jean-Guy
 
D

David Biddulph

Rather than "yd", I think you may want "md" for days excluding months and
years?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top