Calculating Months while taking into consideration days

E

Excel Trouble

If I use the suggested formula
"=(YEAR(A4)-YEAR(A3))*12+MONTH(A4)-MONTH(A3)"
It will indeed calculate the number of months inbetween two dates, however.

If the date is in question is 2/9/05 and todays current date is 2/8/08
the answer will display as 36 months. That in fact, is incorrect. I want
it to take days into consideration. The correct answer should be 35 months,
and on the 9th of 2008 it will infact be 36 months. How do I make the proper
adjustments???
 
R

Ron Rosenfeld

If I use the suggested formula
"=(YEAR(A4)-YEAR(A3))*12+MONTH(A4)-MONTH(A3)"
It will indeed calculate the number of months inbetween two dates, however.

If the date is in question is 2/9/05 and todays current date is 2/8/08
the answer will display as 36 months. That in fact, is incorrect. I want
it to take days into consideration. The correct answer should be 35 months,
and on the 9th of 2008 it will infact be 36 months. How do I make the proper
adjustments???

Try

=DATEDIF(A1,A2,"m")


--ron
 
N

Niek Otten

Look here:

http://www.cpearson.com/excel/datedif.aspx

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

| If I use the suggested formula
| "=(YEAR(A4)-YEAR(A3))*12+MONTH(A4)-MONTH(A3)"
| It will indeed calculate the number of months inbetween two dates, however.
|
| If the date is in question is 2/9/05 and todays current date is 2/8/08
| the answer will display as 36 months. That in fact, is incorrect. I want
| it to take days into consideration. The correct answer should be 35 months,
| and on the 9th of 2008 it will infact be 36 months. How do I make the proper
| adjustments???
 
G

Gary''s Student

With A1 and A2 having:

2/9/2005
2/8/2008

=DATEDIF(A1,A2,"m")
returns 35
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top