![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Apr 2002
Posts: 28
|
Subtracting two dates and would like the answer to be in months.
|
|
|
|
|
|
#2 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Austin, Texas USA
Posts: 11,654
|
=DATEDIF(A1,B1,"M")
|
|
|
|
|
|
#3 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Central Florida, USA
Posts: 7,541
|
=IF(OR(F13="",F16=""),"Enter Both Dates Above!", DATEDIF(F13,F16,"ym")& " months")
This will give only the months portion of the between date. It will not convert the years to month though. Like: 2 years 3 months will = 3 months, not 27 months! And: =IF(OR(F13="",F16=""),"Enter Both Dates Above!", DATEDIF(F13,F16,"m")& " months") will give you your 27 months for 2 years and 3 months. Hope this helps. JSW [ This Message was edited by: Joe Was on 2002-04-26 08:40 ] |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|