Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
=(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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
=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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Calculate Age in Years and Months? | New Users to Excel | |||
SUM Days (to 30), Months (to 12) and Years | Excel Worksheet Functions | |||
converting months to years and months??? | Excel Discussion (Misc queries) | |||
years and months | Excel Worksheet Functions | |||
function years:months | Excel Worksheet Functions |