Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Calculating Months while taking into consideration days

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???
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,651
Default Calculating Months while taking into consideration days

On Fri, 8 Feb 2008 09:45:03 -0800, Excel Trouble
wrote:

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
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,440
Default Calculating Months while taking into consideration days

Look he

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

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"Excel Trouble" wrote in message
...
| 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???


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,058
Default Calculating Months while taking into consideration days

With A1 and A2 having:

2/9/2005
2/8/2008

=DATEDIF(A1,A2,"m")
returns 35
--
Gary''s Student - gsnu200768


"Excel Trouble" wrote:

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???

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 convert a number of days to years, months & days? SafetyLen Excel Discussion (Misc queries) 1 August 23rd 07 01:34 AM
problem of calculating years months and days naughtyboy Excel Discussion (Misc queries) 1 August 7th 06 11:22 AM
FORMULA FOR CALCULATING YEARS, DAYS, & MONTHS BETWEEN SEVERAL DATE Sam Excel Discussion (Misc queries) 3 June 28th 06 10:34 PM
i have two days and i want the difference in days, months, year maja Excel Worksheet Functions 7 April 22nd 06 01:14 AM
How can I sort multiple months/years WITHOUT Alpha order taking o. LisaMU Excel Worksheet Functions 1 April 13th 05 04:46 PM


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

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"