Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 310
Default calculate year and month

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,939
Default calculate year and month

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 347
Default calculate year and month

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 310
Default calculate year and month

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 347
Default calculate year and month

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 310
Default calculate year and month

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 620
Default calculate year and month

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 29
Default calculate year and month


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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default calculate year and month

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,696
Default calculate year and month

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
SUMPRODUCT - (amended) Exclude LAST Row of Matched Criteria (Month & Year) Sam via OfficeKB.com Excel Worksheet Functions 2 January 9th 07 12:37 AM
SUMPRODUCT - Exclude LAST Row of Matched Criteria (Month & Year) Sam via OfficeKB.com Excel Worksheet Functions 10 January 8th 07 07:03 PM
adding from one year to the next p-nut Excel Discussion (Misc queries) 1 December 28th 06 05:50 AM
holiday dates bucci Excel Worksheet Functions 4 June 15th 06 09:35 AM
Month Year Date Format Jamie Excel Worksheet Functions 2 February 7th 05 06:43 PM


All times are GMT +1. The time now is 12:40 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"