+ Reply to Thread
Results 1 to 6 of 6

Count how many months/years have passed?

Hybrid View

  1. #1
    Registered User
    Join Date
    10-15-2008
    Location
    Lincolnshire
    Posts
    53

    Count how many months/years have passed?

    I have a column that contains issue dates, A1= 01/01/2008. And the second column contains a start date, B1= 02/01/2009. What I want to do is count how many months/years have passed from the date in A1.

    Please help!

  2. #2
    Forum Contributor vandanavai's Avatar
    Join Date
    09-04-2006
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    256

    Re: Count how many months/years have passed?

    Hello

    Enter following formula in C1
    =DATEDIF(A1,B1,"m") This will give u months
    =DATEDIF(A1,B1,"y") This will give u years

  3. #3
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097

    Re: Count how many months/years have passed?

    Or maybe

    =DATEDIF(A1,B1,"y") & " years, " & DATEDIF(A1,B1,"ym") & " months"
    oldchippy
    -------------


    Blessed are those who can give without remembering and take without forgetting

    If you are happy with the help you have received, please click the <--- STAR icon on the left - Thanks.

    Click here >>> Top Excel links for beginners to Experts

    Forum Rules >>>Please don't forget to read these

  4. #4
    Forum Expert
    Join Date
    01-03-2006
    Location
    Waikato, New Zealand
    MS-Off Ver
    2010 @ work & 2007 @ home
    Posts
    2,243

    Re: Count how many months/years have passed?

    hi,

    To add to Vandanavai's answer, Chip's below page provides an explanation & further examples of the DateDif function: http://www.cpearson.com/excel/datedif.aspx

    hth
    Rob
    Rob Brockett
    Kiwi in the UK
    Always learning & the best way to learn is to experience...

  5. #5
    Registered User
    Join Date
    10-28-2016
    Location
    The Moon, Milkyway Galaxy
    MS-Off Ver
    2013
    Posts
    19

    Re: Count how many months/years have passed?

    Similar problem with an added step. I need to return how many months have passed to the end of the year, since a start date. So let's say my A1 is 02/01/2017 and the answer is 11 months. Then for A2, the date is a year later, 02/01/2018 and I need to return 23 months and so on with an offset end date of 4/30/2028 returning 123 months. Any ideas? I need to automate this so if I change a constant 123 months, it will return the proper values every year.

  6. #6
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MSO Home and Business 2024
    Posts
    7,266

    Re: Count how many months/years have passed?

    Unfortunately your post does not comply with Rule 2 of our Forum RULES. Do not post a question in the thread of another member -- start your own thread.

    If you feel an existing thread is particularly relevant to your need, provide a link to the other thread in your new thread.

    Old threads are often only monitored by the original participants. New threads not only open you up to all possible participants again, they typically get faster response, too.
    Avoid using Select, Selection and Activate in your code. Use With ... End With instead.
    You can show your appreciation for those that have helped you by clicking the * at the bottom left of any of their posts.

+ 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