+ Reply to Thread
Results 1 to 4 of 4

Month (datedif) to 1 decimal

  1. #1
    jennifer
    Guest

    Month (datedif) to 1 decimal

    Hello! Is there a way to calc the # of months between dates to 1 decimal
    place? Other than taking the difference between 2 dates and dividing by 30.

    Thanks!

  2. #2
    Bob Phillips
    Guest

    Re: Month (datedif) to 1 decimal

    DATEDIF can calculate the number of whole months, like so

    =DATEDIF(A21,B21,"M")

    there is no way that I now of to get to one decimal place because of the
    different number of days in each month the algorithm is somewhat tricky. You
    could do an approximation with

    =DATEDIF(A21,B21,"YM")+DATEDIF(A21,B21,"MD")/30

    which is a little better than (B21-A21)/30


    --
    HTH

    Bob Phillips

    (remove nothere from email address if mailing direct)

    "jennifer" <[email protected]> wrote in message
    news:[email protected]...
    > Hello! Is there a way to calc the # of months between dates to 1 decimal
    > place? Other than taking the difference between 2 dates and dividing by

    30.
    >
    > Thanks!




  3. #3
    Creator
    Guest

    RE: Month (datedif) to 1 decimal

    Hi Jennifer,
    Try this
    =YEARFRAC(C8,G8)*12

    C8 and G8 being the cells with the two dates. Format cell to 1 decimal place
    as required.
    --
    Creator


    "jennifer" wrote:

    > Hello! Is there a way to calc the # of months between dates to 1 decimal
    > place? Other than taking the difference between 2 dates and dividing by 30.
    >
    > Thanks!


  4. #4
    jennifer
    Guest

    Thanks! RE: Month (datedif) to 1 decimal

    Bob & Creator - Thanks!

    "jennifer" wrote:

    > Hello! Is there a way to calc the # of months between dates to 1 decimal
    > place? Other than taking the difference between 2 dates and dividing by 30.
    >
    > Thanks!


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1