+ Reply to Thread
Results 1 to 6 of 6

Negative date value

  1. #1
    Registered User
    Join Date
    11-13-2017
    Location
    Philippines
    MS-Off Ver
    2007
    Posts
    2

    Negative date value

    hi, Please help me solve my problem about error on negative results on two dates,(#num!).
    e.g start date (D2) is greater than end date(O2)

    I am using this codes

    =IF(D2>O2,"-"&ABS(D2-O2),DATEDIF(D2,O2,"m"))

    Thanks

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: Negative date value

    How is it possible for something to end, before it starts?
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Forum Expert shukla.ankur281190's Avatar
    Join Date
    05-17-2014
    Location
    Lucknow, India
    MS-Off Ver
    Office 365
    Posts
    3,935

    Re: Negative date value

    #NUM! error refer to huge value and as I can see in your formula you are trying to achieve if D2 is greater than O2 then your need number of days in in negative value if the condition doesn't then how many number of month in between days.

    May be this error is coming due to wrong input in D2 or O2
    If I helped, Don't forget to add reputation (click on the little star ★ at bottom of this post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: Negative date value

    Excel does not like working with negative dates 0 any negative dates, and will give an error, even if the difference is small

    As a test, try =(today()-1)-today()

  5. #5
    Registered User
    Join Date
    11-13-2017
    Location
    Philippines
    MS-Off Ver
    2007
    Posts
    2

    Re: Negative date value

    thank you for the fast feedback Shukla.ankur281190

    actually the format of the dates are in custom (ddmmyyyy) format. based on the file i'm working, i need to find the remaining terms of the account loans, yet i found errors if small amount of value are being less into huge value. so basically it should return a negative number but #num! is the one that is present in the field. and i need number of years, months , and days.

    Thanks

  6. #6
    Forum Expert shukla.ankur281190's Avatar
    Join Date
    05-17-2014
    Location
    Lucknow, India
    MS-Off Ver
    Office 365
    Posts
    3,935

    Re: Negative date value

    In such kind of case we must require a sample simple. Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.

+ 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. Sum of negative values within date ranges
    By skebabble in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-04-2016, 11:42 AM
  2. Replies: 5
    Last Post: 10-02-2013, 09:49 AM
  3. Calculating a running difference then returning last non-negative date
    By emdee in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 01-04-2013, 08:39 PM
  4. Retreive the date of the first negative number
    By ExcelQuestion in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 04-08-2009, 06:56 PM
  5. Negative date values without changing the Date System
    By softuser in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-11-2007, 06:07 PM
  6. correcting a negative date formula
    By woodlot4 in forum Excel General
    Replies: 6
    Last Post: 11-06-2005, 06:10 AM
  7. Eliminating Negative Values from Date Subtractions
    By Mhz in forum Tips and Tutorials
    Replies: 1
    Last Post: 08-23-2005, 11:51 AM

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