![]() |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
All times are GMT +1. The time now is 11:14 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com