ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How to calculate number of month from 2008 in Excel? (https://www.excelbanter.com/excel-programming/352605-how-calculate-number-month-2008-excel.html)

Frank[_25_]

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.






Andrew Taylor

How to calculate number of month from 2008 in Excel?
 
See answers in .misc

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.



Soniya[_4_]

How to calculate number of month from 2008 in Excel?
 
Just a hint:

if you have =today() in A1 and 31/12/2008 in B1 then

in C1
="=" & (YEAR(B1)-YEAR(A1))*12+MONTH(B1)-MONTH(A1)& " Motnhs, " &
DATEDIF(A1,B1,"md") & " Days"

will give you =34 Months, 24 Days

and
=DATEDIF(A1,B1,"y") & " Year " & DATEDIF(A1,B1,"ym") & " Months " &
DATEDIF(A1,B1,"md") & " Days"

will give you 2 Years 10 Months 24 Days

and

="=" &(YEAR(B1)-YEAR(A1))*12+MONTH(B1)-MONTH(A1)& " and " &
DATEDIF(A1,B1,"md") & "/31"

will give =34 and 24/31

Thanks



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.



Frank[_25_]

How to calculate number of month from 2008 in Excel?
 
Thank you Soniya.


"Soniya" wrote in message
oups.com...
Just a hint:

if you have =today() in A1 and 31/12/2008 in B1 then

in C1
="=" & (YEAR(B1)-YEAR(A1))*12+MONTH(B1)-MONTH(A1)& " Motnhs, " &
DATEDIF(A1,B1,"md") & " Days"

will give you =34 Months, 24 Days

and
=DATEDIF(A1,B1,"y") & " Year " & DATEDIF(A1,B1,"ym") & " Months " &
DATEDIF(A1,B1,"md") & " Days"

will give you 2 Years 10 Months 24 Days

and

="=" &(YEAR(B1)-YEAR(A1))*12+MONTH(B1)-MONTH(A1)& " and " &
DATEDIF(A1,B1,"md") & "/31"

will give =34 and 24/31

Thanks



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.





Frank[_25_]

How to calculate number of month from 2008 in Excel?
 
Thank you.

"Andrew Taylor" wrote in message
oups.com...
See answers in .misc

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.






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

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