![]() |
![]() |
|
|||||||
| 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 |
|
Board Regular
Join Date: Mar 2002
Posts: 160
|
Is there away to calculate the difference in months if we are given two months?
So say we have: 17-Apr-02 17-Oct-02 The difference in months is 6 So in the 3rd column 6MTH would be calculated. I would need to account for dates which are maybe a day or two out. So, if we had: 17-Apr-02 16-Oct-02, this would still output 6Mth |
|
|
|
|
|
#2 |
|
Board Regular
Join Date: Mar 2002
Location: Cincinnati, Ohio, USA
Posts: 6,824
|
Hi BenNV
Guess new code did not work? Anyway, this formula is only good for 12 months from the starting date. If starting date is in A1 ending date in B1 =IF(MONTH(A1) 13 months shows as -1 Tom [ This Message was edited by: TsTom on 2002-04-10 06:51 ] |
|
|
|
|
|
#3 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: The Hague
Posts: 50,319
|
Quote:
=INT((B1-A1)/30) or =INT((B1-A1)/30)&"Mth" to be entered in C1? Try also ROUND: =ROUND((B1-A1)/30,0) or =ROUND((B1-A1)/30,0)&"Mth" Aladin |
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|