+ Reply to Thread
Results 1 to 7 of 7

DATEDIF - DATEDIF Calculation returning a negative for days or months

  1. #1
    Forum Contributor
    Join Date
    05-04-2013
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    125

    DATEDIF - DATEDIF Calculation returning a negative for days or months

    Hi all,

    I'm looking for some help with subtracting a range of dates, from another range of dates using datedif formula.

    The issue is that the end result is producing a negative number of days (-9 in this example) or months in cell E11.

    Is there any way to accurately subtract a larger number of dates from a smaller, thereby reducing the months by one?

    The example has an employees period of employment being reduced by a range which doesn't count as service.

    Any help would be appreciated.

    Thanks

    David
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,152

    Re: DATEDIF - DATEDIF Calculation returning a negative for days or months

    One approach:

    Calculate all date differences as days for both PTS and Leave rows 3 to 7) - could use "helper" columns.

    Sum all values for each and use formula below; (in my example A17 contains SUM(PTS) -SUM(Leave)


    =DATEDIF(0,A17,"y")&" years " &DATEDIF(0,A17,"ym")&" months "&DATEDIF(0,A17,"md")&" days"

    This is the result from your data: 2 years 11 months 24 days

  3. #3
    Forum Contributor
    Join Date
    05-04-2013
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    125

    Re: DATEDIF - DATEDIF Calculation returning a negative for days or months

    Hi John, thanks for the help, is there any chance you could provide a sample file showing the calc?

    Cheers

    David

  4. #4
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,152

    Re: DATEDIF - DATEDIF Calculation returning a negative for days or months

    See attached.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    08-25-2015
    Location
    London, England
    MS-Off Ver
    excel 2013
    Posts
    12

    Re: DATEDIF - DATEDIF Calculation returning a negative for days or months

    Tutorial video Datedif usage:

    https://www.youtube.com/watch?v=PaD1P1QwnB4
    Last edited by John90; 09-02-2015 at 10:10 PM.

  6. #6
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,152

    Re: DATEDIF - DATEDIF Calculation returning a negative for days or months

    If your problem is resolved could you mark the thread as SOLVED ("thread Tools" on first post header).

    Thank you.

  7. #7
    Forum Contributor
    Join Date
    05-04-2013
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    125

    Re: DATEDIF - DATEDIF Calculation returning a negative for days or months

    Thanks John, much appreciated. I'll close the post.

+ 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. Replies: 3
    Last Post: 07-16-2014, 01:50 AM
  2. Negative Datedif
    By mattsgr1 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-22-2013, 03:42 PM
  3. Datedif - 20 days
    By Matt_Excel in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-14-2013, 01:46 PM
  4. DateDif Average? Damn DateDif
    By UTCHELP in forum Excel Formulas & Functions
    Replies: 15
    Last Post: 12-10-2012, 08:53 AM
  5. Replies: 7
    Last Post: 05-02-2012, 08:51 PM
  6. Datedif Calculation between to dates?
    By Ethos in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-23-2007, 04:50 AM
  7. [SOLVED] Negative return in =DATEDIF function
    By Steve in forum Excel General
    Replies: 4
    Last Post: 03-02-2006, 02:25 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