Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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) |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Check out thisw link on the DateDif function...
http://www.cpearson.com/excel/datedif.htm -- HTH... Jim Thomlinson "michelle" wrote: 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) |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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(st art_date,end_date,"ym")1," months "," month") HTH Jean-Guy "michelle" wrote: 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) |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
This helped much. Can I add the number of days to this also?
"pinmaster" wrote: 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(st art_date,end_date,"ym")1," months "," month") HTH Jean-Guy "michelle" wrote: 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) |
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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 "michelle" wrote: This helped much. Can I add the number of days to this also? "pinmaster" wrote: 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(st art_date,end_date,"ym")1," months "," month") HTH Jean-Guy "michelle" wrote: 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) |
#6
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Thank you again...I figured it out after I asked.
"pinmaster" wrote: 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 "michelle" wrote: This helped much. Can I add the number of days to this also? "pinmaster" wrote: 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(st art_date,end_date,"ym")1," months "," month") HTH Jean-Guy "michelle" wrote: 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) |
#7
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Rather than "yd", I think you may want "md" for days excluding months and
years? -- David Biddulph "pinmaster" wrote in message ... 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. "michelle" wrote: This helped much. Can I add the number of days to this also? "pinmaster" wrote: 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(st art_date,end_date,"ym")1," months "," month") "michelle" wrote: 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) |
#8
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]() Hi, I had raised a similar post but got the answer from you. thanks krishna "pinmaster" wrote: 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(st art_date,end_date,"ym")1," months "," month") HTH Jean-Guy "michelle" wrote: 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) |
#9
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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 -- Gary's Student gsnu200703 "michelle" wrote: 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) |
#10
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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. "michelle" wrote: 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) |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
SUMPRODUCT - (amended) Exclude LAST Row of Matched Criteria (Month & Year) | Excel Worksheet Functions | |||
SUMPRODUCT - Exclude LAST Row of Matched Criteria (Month & Year) | Excel Worksheet Functions | |||
adding from one year to the next | Excel Discussion (Misc queries) | |||
holiday dates | Excel Worksheet Functions | |||
Month Year Date Format | Excel Worksheet Functions |