+ Reply to Thread
Results 1 to 10 of 10

Calculating Number of Months passed between two sets of days

  1. #1
    Registered User
    Join Date
    02-27-2007
    Posts
    26

    Calculating Number of Months passed between two sets of days

    Hello,
    I am stuck. I need to calculate the number of months between two sets of dates: for example

    5/08/2008-todays date 1/23/2009=

    Please help.

    Thanks
    Cindy

  2. #2
    Forum Contributor
    Join Date
    04-21-2007
    Location
    Lima, Peru
    MS-Off Ver
    2000, 2007, 2010
    Posts
    674

    Counting Months

    Hi

    For complete months use "Date one minus Date two" and format using Custom format as "MM", providing it is not more than one year.

    Regards

    Jeff

  3. #3
    Registered User
    Join Date
    02-27-2007
    Posts
    26
    In most cases it is more than one year...How would I modify the formula?

  4. #4
    Forum Contributor
    Join Date
    04-21-2007
    Location
    Lima, Peru
    MS-Off Ver
    2000, 2007, 2010
    Posts
    674

    Date difference

    Hi

    Sorry I should have added

    Please Login or Register  to view this content.
    If your dates are in the relevant cells.

    Regards

    Jeff

  5. #5
    Registered User
    Join Date
    02-27-2007
    Posts
    26
    That worked out great. But now Im being asked to show "x years, x months, x days". I know, I know this should be really easy to figure out...

  6. #6
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531
    A1: start
    A2: end
    A3: =A2-A1
    A3 custom format of: y "Years, " m "Months & " d "Days"
    (note you may need to add 1 to A3 result if dates are to be seen as inclusive).

    EDIT: disregard -- safer to adopt DATEDIF as outlined by arthurbr and prior post... note though that earliest date should be listed first (the below is I suspect the opposite way around for you in reality - ie TODAY() > start date)
    Last edited by DonkeyOte; 01-23-2009 at 04:38 PM.

  7. #7
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326
    Try =DATEDIF(TODAY(),a1,"y")&" years "&DATEDIF(TODAY(),a1,"ym")&" months "&DATEDIF(TODAY(),a1,"md")&" days"

  8. #8
    Registered User
    Join Date
    02-27-2007
    Posts
    26

    Still Confused

    I still cant get it to work. I have changed the cells to reflect the ones in my spreadsheet. I cant upload my attachment so here is a summary of what i have on my spread sheet:

    I4= 05/28/2008 the day the person began at a location
    J4= 01/23/2009 todays date
    K4= calculated the amount of time in x years, x months, x days (the amount of time the person has been at a location)

  9. #9
    Forum Contributor
    Join Date
    04-21-2007
    Location
    Lima, Peru
    MS-Off Ver
    2000, 2007, 2010
    Posts
    674

    DATEDIF function

    HI

    With DATEDIF the first value is the startdate, so if you change around cell A1 and Today() the function should be okay.

    Regards


    Jeff

  10. #10
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326
    Quote Originally Posted by solnajeff View Post
    HI

    With DATEDIF the first value is the startdate, so if you change around cell A1 and Today() the function should be okay.

    Regards


    Jeff
    Right Jeff,
    thx for the correction

+ 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