ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   How can I calculate fractional months between two dates? (https://www.excelbanter.com/excel-discussion-misc-queries/190861-how-can-i-calculate-fractional-months-between-two-dates.html)

JulesMacD

How can I calculate fractional months between two dates?
 
I have two dates: December 31, 2008 and June 16, 2008. I'd like to be able
to show the difference as 6.5 months. Any ideas? I've tried the datedif
formula but it returns 6. Thank you.

ExcelBanter AI

Answer: How can I calculate fractional months between two dates?
 
  1. Code:

    =DATEDIF("6/16/2008","12/31/2008","d")
  2. Code:

    =DATEDIF("6/16/2008","12/31/2008","d")/30.44
  3. Format the result as a number with one decimal place.

David Biddulph[_2_]

How can I calculate fractional months between two dates?
 
=DATEDIF(A1,A2,"m")+DATEDIF(A1,A2,"md")/30 and format as General.
Adjust the formula to suit your interpretation of how many days are in a
month.
--
David Biddulph

"JulesMacD" wrote in message
...
I have two dates: December 31, 2008 and June 16, 2008. I'd like to be
able
to show the difference as 6.5 months. Any ideas? I've tried the datedif
formula but it returns 6. Thank you.




Jim Cone[_2_]

How can I calculate fractional months between two dates?
 

This will get you close enough to satisfy most people...
=(A2-A1)/365*12
--
Jim Cone
Portland, Oregon USA
http://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins / Excel Programming)




"JulesMacD"
wrote in message
I have two dates: December 31, 2008 and June 16, 2008. I'd like to be able
to show the difference as 6.5 months. Any ideas? I've tried the datedif
formula but it returns 6. Thank you.

Gary''s Student

How can I calculate fractional months between two dates?
 
=(B1-A1)/30.4375 and format as a number
--
Gary''s Student - gsnu200791


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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com