Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Frank
 
Posts: n/a
Default How to calculate number of month from 2008 in Excel?

I need to calculate the number of months from today to 2008 Dec 31, and
put that in an Excel cell with equal sign, and fraction of a month is
divided by 31.

How do I do that?

PS: I am not looking for dedicated VBA script module.

Thank you.




  #2   Report Post  
Posted to microsoft.public.excel.misc
Dav
 
Posts: n/a
Default How to calculate number of month from 2008 in Excel?


It depends how you define the difference between months, A simple answer
which is close to what you want is
=(DATE(2008,12,31)-TODAY())/365.25*12

How bothered are you about the 31 and this will give a different
reading as all months are not the same length than the literal number
of months, but it is very close

Dav


--
Dav
------------------------------------------------------------------------
Dav's Profile: http://www.excelforum.com/member.php...o&userid=27107
View this thread: http://www.excelforum.com/showthread...hreadid=509270

  #3   Report Post  
Posted to microsoft.public.excel.misc
Andrew Taylor
 
Posts: n/a
Default How to calculate number of month from 2008 in Excel?

You can use DATEDIF() for this: with today's date in A1 and 31/12/08 in
A2 the formula is

=DATEDIF(A1,A2,"M") +
DATEDIF(DATE(YEAR(A1),MONTH(A1)+DATEDIF(A1,A2,"M") ,DAY(A1)),A2,"D")/31



Frank wrote:
I need to calculate the number of months from today to 2008 Dec 31, and
put that in an Excel cell with equal sign, and fraction of a month is
divided by 31.

How do I do that?

PS: I am not looking for dedicated VBA script module.

Thank you.


  #4   Report Post  
Posted to microsoft.public.excel.misc
flummi
 
Posts: n/a
Default How to calculate number of month from 2008 in Excel?

I guess Excel takes care of the fact that months have a different nmber
of days.

So when you you subtract date1 from date2 and the receiving cell is
formatted as e.g. dd.mm.yy then the result would read something like
11.23.02 which means the difference is 11 days, 23 months and 2 years.

Hans

  #5   Report Post  
Posted to microsoft.public.excel.misc
Andrew Taylor
 
Posts: n/a
Default How to calculate number of month from 2008 in Excel?

No, this is not correct. Try a few examples.


flummi wrote:
I guess Excel takes care of the fact that months have a different nmber
of days.

So when you you subtract date1 from date2 and the receiving cell is
formatted as e.g. dd.mm.yy then the result would read something like
11.23.02 which means the difference is 11 days, 23 months and 2 years.

Hans




  #6   Report Post  
Posted to microsoft.public.excel.misc
Andrew Taylor
 
Posts: n/a
Default How to calculate number of month from 2008 in Excel?

No, this is not correct. Try a few examples.


flummi wrote:
I guess Excel takes care of the fact that months have a different nmber
of days.

So when you you subtract date1 from date2 and the receiving cell is
formatted as e.g. dd.mm.yy then the result would read something like
11.23.02 which means the difference is 11 days, 23 months and 2 years.

Hans


  #7   Report Post  
Posted to microsoft.public.excel.misc
flummi
 
Posts: n/a
Default How to calculate number of month from 2008 in Excel?

You are right, I should have tried it. :-(

  #8   Report Post  
Posted to microsoft.public.excel.misc
pinmaster
 
Posts: n/a
Default How to calculate number of month from 2008 in Excel?

How about this:

="="&DATEDIF(TODAY(),DATE(2008,12,31),"m")+ROUND(( DATEDIF(TODAY(),DATE(2008,12,31),"md")/31),2)

should give you something like =34.77 with the equal sign

HTH
JG

"Frank" wrote:

I need to calculate the number of months from today to 2008 Dec 31, and
put that in an Excel cell with equal sign, and fraction of a month is
divided by 31.

How do I do that?

PS: I am not looking for dedicated VBA script module.

Thank you.





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
How do I calculate the root of a number using Excel? Arthur Yeager Excel Worksheet Functions 4 May 10th 07 08:35 AM
Calculate Days in a Month LGG Excel Discussion (Misc queries) 6 January 13th 06 06:31 PM
formatting number value to text value in excel jazzydwit Excel Worksheet Functions 2 December 29th 05 03:17 AM
convert text-format number to number in excel 2000%3f Larry Excel Discussion (Misc queries) 1 July 29th 05 08:18 PM
how to get week number in month in excel ? ikin Charts and Charting in Excel 2 January 16th 05 05:54 PM


All times are GMT +1. The time now is 10:27 PM.

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

About Us

"It's about Microsoft Excel"