+ Reply to Thread
Results 1 to 5 of 5

calculating years/months with YEARFRAC?

  1. #1
    Stilla
    Guest

    calculating years/months with YEARFRAC?

    Hello,

    I'm using the =Yearfrac formula to calculate tenure. It returns the result
    in years and fractions of years; e.g., 5.5 yrs.

    Is there any way that the interval between two dates can be calculated in
    years and months, so that I get 5yrs 6months?

    thanks!

  2. #2
    Valued Forum Contributor
    Join Date
    03-25-2004
    Location
    Boston, MA US
    Posts
    1,094
    You could use the DATEDIF function.

    =DATEDIF(A1,NOW(),"y") & " yrs, " & DATEDIF(A1,NOW(),"ym") & " months"

    HTH,

    Steve

  3. #3
    Roger Govier
    Guest

    Re: calculating years/months with YEARFRAC?

    Hi

    Try
    =DATEDIF(earlydate,latedate,"y")&" years
    "&DATEDIF(earlydate,latedate,"ym")&" months"
    For more information on the undocumented datedif function, take a look
    at Chip Pearson's site
    http://www.cpearson.com/excel/datedif.htm

    --
    Regards

    Roger Govier



    Stilla wrote:
    > Hello,
    >
    > I'm using the =Yearfrac formula to calculate tenure. It returns the
    > result in years and fractions of years; e.g., 5.5 yrs.
    >
    > Is there any way that the interval between two dates can be
    > calculated in years and months, so that I get 5yrs 6months?
    >
    > thanks!




  4. #4
    Stilla
    Guest

    Re: calculating years/months with YEARFRAC?

    WOW! This is like magic!!! THANK YOU!!!

    "SteveG" wrote:

    >
    > You could use the DATEDIF function.
    >
    > =DATEDIF(A1,NOW(),"y") & " yrs, " & DATEDIF(A1,NOW(),"ym") & " months"
    >
    > HTH,
    >
    > Steve
    >
    >
    > --
    > SteveG
    > ------------------------------------------------------------------------
    > SteveG's Profile: http://www.excelforum.com/member.php...fo&userid=7571
    > View this thread: http://www.excelforum.com/showthread...hreadid=514994
    >
    >


  5. #5
    Stilla
    Guest

    Re: calculating years/months with YEARFRAC?

    Thanks Roger! works perfectly!

    "Roger Govier" wrote:

    > Hi
    >
    > Try
    > =DATEDIF(earlydate,latedate,"y")&" years
    > "&DATEDIF(earlydate,latedate,"ym")&" months"
    > For more information on the undocumented datedif function, take a look
    > at Chip Pearson's site
    > http://www.cpearson.com/excel/datedif.htm
    >
    > --
    > Regards
    >
    > Roger Govier
    >
    >
    >
    > Stilla wrote:
    > > Hello,
    > >
    > > I'm using the =Yearfrac formula to calculate tenure. It returns the
    > > result in years and fractions of years; e.g., 5.5 yrs.
    > >
    > > Is there any way that the interval between two dates can be
    > > calculated in years and months, so that I get 5yrs 6months?
    > >
    > > 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