Thanks Thanks:  0
Likes Likes:  0
Results 1 to 3 of 3

Thread: Difference in months given two dates

  1. #1
    Board Regular
    Join Date
    Mar 2002
    Posts
    160
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    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. #2
    Board Regular
    Join Date
    Mar 2002
    Location
    Cincinnati, Ohio, USA
    Posts
    6,824
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    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. #3
    MrExcel MVP Aladin Akyurek's Avatar
    Join Date
    Feb 2002
    Location
    The Hague, NL
    Posts
    83,635
    Post Thanks / Like
    Mentioned
    33 Post(s)
    Tagged
    6 Thread(s)

    Default

    On 2002-04-10 06:21, BenNV wrote:
    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

    How about simpler:

    =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

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •