+ Reply to Thread
Results 1 to 7 of 7

Datedif Formula????

  1. #1
    Registered User
    Join Date
    09-03-2013
    Location
    South Carolina
    MS-Off Ver
    Excel 2010
    Posts
    5

    Datedif Formula????

    Hello Gurus!!

    I hope I can explain this like an educated person!!
    I need some help creating one formula to calculate duration for periods of time, all with a start date and some with an end date. The duration column needs to display both duration of completed tasks and duration of ongoing tasks. My issue lies in the data without an end date. I need my third column (duration) to display the number of months from the start date to the current date, but update automatically when I re-open the file. At this time, I only need complete months, but I will be modifying the file later to display partial months.

    completed task: end date - start date = duration

    ongoing task: (I have a start date only) I would like this cell to update data automatically, rounding up to the next month. (eventually this will need to calculate months, weeks, & days - but not now)

    I apologize if this is posted elsewhere. I have tried searching for similiar topics in the threads.

    Thank you for any help.
    Bosox76
    Last edited by Bosox76; 09-03-2013 at 10:10 AM.

  2. #2
    Registered User
    Join Date
    09-03-2013
    Location
    South Carolina
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Datedif Formula????

    Here are the two formulas I need to "combine" so one column provides the all needed information. If there is no end date I need the duration to date displayed.

    MONTH(O3-M3) Total Completed Duration

    DATEDIF(M4,TODAY(),"M") Duration to date

  3. #3
    Forum Expert Jakobshavn's Avatar
    Join Date
    08-17-2012
    Location
    Lakehurst, NJ, USA
    MS-Off Ver
    Excel 2007
    Posts
    1,970

    Re: Datedif Formula????

    See the attached workbook
    Attached Files Attached Files
    Gary's Student

  4. #4
    Registered User
    Join Date
    09-03-2013
    Location
    South Carolina
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Datedif Formula????

    That is what I was looking for!! Thank you so much.
    How do I show partial months as a 1 instead of 0?
    Do I need to start a new thread for this question?

  5. #5
    Forum Expert Jakobshavn's Avatar
    Join Date
    08-17-2012
    Location
    Lakehurst, NJ, USA
    MS-Off Ver
    Excel 2007
    Posts
    1,970

    Re: Datedif Formula????

    You could change
    =DATEDIF(A2,IF(B2="",TODAY(),B2),"m")
    into
    =MAX(DATEDIF(A2,IF(B2="",TODAY(),B2),"m"),1)

    but the whole idea of "partial" months is unclear. Consider looking at days as well as months. See:

    http://www.cpearson.com/Excel/datedif.aspx

  6. #6
    Registered User
    Join Date
    09-03-2013
    Location
    South Carolina
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Datedif Formula????

    If the duration is less than one month, I need it to show as a 1, instead of a 0.
    This is just my first step in creating a functional spreadsheet that will be updated regularly. I will eventually format for weeks and days, but for now I am taking baby steps.

  7. #7
    Registered User
    Join Date
    09-03-2013
    Location
    South Carolina
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Datedif Formula????

    Thank you Jak. The MAX formula solved my problem. I appreciate the help.

+ 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. [SOLVED] DATEDIF formula
    By Nubian in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-01-2013, 10:09 AM
  2. DateDif Average? Damn DateDif
    By UTCHELP in forum Excel Formulas & Functions
    Replies: 15
    Last Post: 12-10-2012, 08:53 AM
  3. Error using DATEDIF formula
    By Keith H in forum Excel General
    Replies: 0
    Last Post: 12-25-2011, 11:04 AM
  4. Excel 2007 : nesting if and datedif formula
    By justagal in forum Excel General
    Replies: 13
    Last Post: 01-17-2011, 03:24 PM
  5. DATEDIF Formula
    By kwright90 in forum Excel General
    Replies: 4
    Last Post: 04-24-2007, 03:34 PM

Tags for this Thread

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