+ Reply to Thread
Results 1 to 6 of 6

Datedif

  1. #1
    Registered User
    Join Date
    02-21-2014
    Location
    Glasgow,Scotland
    MS-Off Ver
    Excel 2013
    Posts
    2

    Datedif

    I need to calculate the date difference between two dates and get the result in the number of years and proportion of months ie;

    20/09/99 to 01/02/02 is 2.33333333 years. I can use the DATEDIF function to get 2 years 4 months as the result but for the calc I'm doing I need it in the format of 2.33333333. Thinking I just need to tweak the DATEDIF a bit but just can't work it out!

    Any help greatly appreciated!

    Cheers!
    Last edited by starksky; 02-23-2014 at 09:28 PM.

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,713

    Re: Datedif

    Try dividing the month part by 12 and adding that to the years, i.e.

    =DATEDIF(A2,B2,"y")+DATEDIF(A2,B2,"m")/12
    Audere est facere

  3. #3
    Forum Expert
    Join Date
    12-11-2011
    Location
    Netherlands
    MS-Off Ver
    office 365
    Posts
    3,657

    Re: Datedif

    A1=20/9/99
    A2=01/02/02
    Try this formula:
    =(A2-A1)/365
    Willem
    English is not my native language sorry for errors
    Please correct me if I'm completely wrong

  4. #4
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Datedif

    Try
    =DATEDIF(A1,A2,"y")+DATEDIF(A1,A2,"ym")/12
    Does that work for you?
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  5. #5
    Registered User
    Join Date
    02-21-2014
    Location
    Glasgow,Scotland
    MS-Off Ver
    Excel 2013
    Posts
    2

    Re: Datedif

    =DATEDIF(A1,A2,"y")+DATEDIF(A1,A2,"ym")/12 gets me what i'm looking for - 2.333333333. Thanks ChemistB ! greatly appreciated! and to the other answers - you got closer than i did, cheers!

  6. #6
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,713

    Re: Datedif

    ChemistB's suggestion was the one I was aiming for.....but thinking about it that will give you the same result as this

    =DATEDIF(A2,B2,"m")/12

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. DateDif Average? Damn DateDif
    By UTCHELP in forum Excel Formulas & Functions
    Replies: 15
    Last Post: 12-10-2012, 08:53 AM
  2. Excel 2007 : Datedif
    By mick2 in forum Excel General
    Replies: 3
    Last Post: 07-28-2010, 01:06 AM
  3. DateDif
    By vandanavai in forum Excel General
    Replies: 4
    Last Post: 01-30-2007, 12:42 PM
  4. Help with datedif
    By nickbelmont in forum Excel General
    Replies: 3
    Last Post: 11-27-2006, 01:03 PM
  5. [SOLVED] DatedIF
    By StephanieH in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-21-2006, 01:50 AM

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