![]() |
|
#1
|
||||
|
||||
![]()
Guys, Good Afternoon.
I have start date 01/30/2009 (A2) and end date 29/01/2011 (B2). That totals 24 months. When I use the formulate month = month (B2-A2) appears 12. Someone could tell me why this? Sorry for the mistakes, I am Brazilian and it's hard to get help at the forums of my country. Thanks |
#2
|
||||
|
||||
![]()
In your formula, you appear to be trying to subtract one date from another to get the number of days difference, then asking for the number of months those days would total.
The first part is okay, since your result of B2-A2 comes to 729 days. The problem is with your use of the MONTH function. The MONTH function will give you a month (as a number 1-12) if you give it a date. However, you are asking Excel to tell you what month is "729". Excel is converting the number 729 to a date, in this case it is 29 Dec 1901. The MONTH function then correctly provides you with the number 12 to represent December. It might be better for you to use the DATEDIF function instead. For your example, you might try this: Code:
=DATEDIF(A2,B2,"m")&" months "&DATEDIF(A2,B2,"md")&" days" |
#3
|
||||
|
||||
![]()
Sorry for my ignorance, but my knowledge is limited! How that would be the formulate?
|
#4
|
||||
|
||||
![]()
Have a look.
|
#5
|
||||
|
||||
![]()
Now it worked, thanks for the help.
|
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Excel 2010 view of cel missing | isla | Excel | 2 | 09-27-2013 09:35 AM |
![]() |
judicial85 | Excel | 3 | 12-05-2010 07:22 PM |
Get just grey box when opening Excel Document 2010 | sebbero | Excel | 1 | 11-10-2010 04:24 AM |
Can't see delegates calendar past next month. | enviroko | Outlook | 3 | 08-08-2010 01:10 PM |
Displaying work week in month view | tupham | Outlook | 0 | 10-28-2008 02:55 PM |