Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 231
Default Counting months between two years

Hi, I am trying to be able to calculate how many months are between two
dates. I have been able to figure it out for going from a month at the
beginning of the year to a month later in the year.

[ex. 2/12/07 to 9/1/07 gives me 7, with =MONTH(B2)-MONTH(C2)]

But if i were to go from 9/1/07 to 2/12/08, it won't work.

Can anyone help me?
-Sarah
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default Counting months between two years

=(YEAR(B1)-YEAR(A1))*12+MONTH(B1)-MONTH(A1)

Will work if the year is the same or different.

Mike

"Sarah" wrote:

Hi, I am trying to be able to calculate how many months are between two
dates. I have been able to figure it out for going from a month at the
beginning of the year to a month later in the year.

[ex. 2/12/07 to 9/1/07 gives me 7, with =MONTH(B2)-MONTH(C2)]

But if i were to go from 9/1/07 to 2/12/08, it won't work.

Can anyone help me?
-Sarah

  #3   Report Post  
Posted to microsoft.public.excel.misc
bj bj is offline
external usenet poster
 
Posts: 1,397
Default Counting months between two years

try =datedif(start_date, End_date,"m")
you won't find datedif in help but you will find alo if you google it.

"Sarah" wrote:

Hi, I am trying to be able to calculate how many months are between two
dates. I have been able to figure it out for going from a month at the
beginning of the year to a month later in the year.

[ex. 2/12/07 to 9/1/07 gives me 7, with =MONTH(B2)-MONTH(C2)]

But if i were to go from 9/1/07 to 2/12/08, it won't work.

Can anyone help me?
-Sarah

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,651
Default Counting months between two years

=DATEDIF(A1,B1,"m")
--
David Biddulph

"Sarah" wrote in message
...
Hi, I am trying to be able to calculate how many months are between two
dates. I have been able to figure it out for going from a month at the
beginning of the year to a month later in the year.

[ex. 2/12/07 to 9/1/07 gives me 7, with =MONTH(B2)-MONTH(C2)]

But if i were to go from 9/1/07 to 2/12/08, it won't work.

Can anyone help me?
-Sarah



  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 231
Default Counting months between two years

Thank you so much. You are amazing!

"David Biddulph" wrote:

=DATEDIF(A1,B1,"m")
--
David Biddulph

"Sarah" wrote in message
...
Hi, I am trying to be able to calculate how many months are between two
dates. I have been able to figure it out for going from a month at the
beginning of the year to a month later in the year.

[ex. 2/12/07 to 9/1/07 gives me 7, with =MONTH(B2)-MONTH(C2)]

But if i were to go from 9/1/07 to 2/12/08, it won't work.

Can anyone help me?
-Sarah






  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,651
Default Counting months between two years

You're welcome.

For some reason known only to Mr Gates, DATEDIF() is the one function not
mentioned in Excel help.
--
David Biddulph

"Sarah" wrote in message
...
Thank you so much. You are amazing!


"David Biddulph" wrote:

=DATEDIF(A1,B1,"m")


"Sarah" wrote in message
...
Hi, I am trying to be able to calculate how many months are between two
dates. I have been able to figure it out for going from a month at the
beginning of the year to a month later in the year.

[ex. 2/12/07 to 9/1/07 gives me 7, with =MONTH(B2)-MONTH(C2)]

But if i were to go from 9/1/07 to 2/12/08, it won't work.

Can anyone help me?
-Sarah






  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 115
Default Counting months between two years

David wrote on Tue, 5 Jun 2007 19:31:50 +0100:

DB You're welcome.

DB For some reason known only to Mr Gates, DATEDIF() is the
DB one function not mentioned in Excel help.
DB --
DB David Biddulph

DB "Sarah" wrote in message
DB ...
?? Thank you so much. You are amazing!

?? "David Biddulph" wrote:
??
?? =DATEDIF(A1,B1,"m")

Sarah! I'm sure David has seen it but you might be interested in
http://www.cpearson.com/excel/datedif.htm

Here's the beginning of the article which also gives the
possible outputs in addition to "m" for months..

The DATEDIF function is a worksheet function that computes the
difference between two dates. This function is available in all
versions of Excel since version 5, but is documented only in the
help files for Excel 2000. It isn't documented in either Excel
97 or Excel 2002. DATEDIF has, for whatever reason, been
treated as one of the drunk cousins of the Function Family.
Excel knows he lives a happy and useful existence, and will
acknowledge his existence when you ask, but will never mention
him in "polite" conversation.

James Silverton
Potomac, Maryland

E-mail, with obvious alterations:
not.jim.silverton.at.verizon.not

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
Calculate Age in Years and Months? Grd New Users to Excel 1 February 15th 06 05:07 PM
SUM Days (to 30), Months (to 12) and Years an Excel Worksheet Functions 5 November 23rd 05 02:20 PM
converting months to years and months??? Marty Excel Discussion (Misc queries) 1 February 18th 05 02:38 AM
years and months [email protected] Excel Worksheet Functions 5 January 8th 05 02:53 PM
function years:months Brock Excel Worksheet Functions 1 December 3rd 04 05:02 PM


All times are GMT +1. The time now is 04:30 AM.

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"