+ Reply to Thread
Results 1 to 3 of 3

Having a problem with "DATEDIF".

  1. #1
    Forum Contributor
    Join Date
    02-02-2013
    Location
    Jacksonville, Florida
    MS-Off Ver
    Excel 2010
    Posts
    169

    Having a problem with "DATEDIF".

    This is the formula that I am using "=IF(DATEDIF(C7,D7,"d")=0,"",DATEDIF(C7,D7,"d"))" , (It works and I get the result that I am looking for), but what is happening is when I enter the date in C7 I get "#NUM!" in E7 before I enter the second date in D7. If I did not want to see the "#NUM! result in E7 before I enter the date in D7, what would the formula have to be? Any help on this would be appreciated. Thank you in advance.


    Roco

  2. #2
    Forum Expert
    Join Date
    12-03-2009
    Location
    Florence, Italy
    MS-Off Ver
    Excel 2019
    Posts
    1,796

    Re: Having a problem with "DATEDIF".

    Hi

    first attempt:


    =IFERROR(IF(DATEDIF(C7,D7,"d")=0,"",DATEDIF(C7,D7,"d")),"")

    Regards
    -----------------------------------------------------

    At Excelforum, you can say "Thank you!" by clicking the star icon ("Add Reputation") below the post.

    Please, mark your thread [SOLVED] if you received your answer.

  3. #3
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Having a problem with "DATEDIF".

    Or maybe this...

    =IF(OR(C7=0,D7=0),0,DATEDIF(C7,D7,"d"))
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

+ 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 to Show "Years-Months" Results
    By Mvaldesi in forum Excel Formulas & Functions
    Replies: 22
    Last Post: 06-28-2018, 03:58 PM
  2. Replies: 1
    Last Post: 08-03-2015, 10:46 PM
  3. using DATEDIF to find "life cycle" for devices
    By xcmm405 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-13-2014, 09:23 AM
  4. Replies: 4
    Last Post: 11-17-2013, 12:05 PM
  5. [SOLVED] Why "datedif" function results sometimes negative numbers?
    By Ron Rosenfeld in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-06-2005, 06:05 AM
  6. Why "datedif" function results sometimes negative numbers?
    By Ambrosiy in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 12:05 AM
  7. [SOLVED] Why "datedif" function results sometimes negative numbers?
    By Ambrosiy in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-05-2005, 10:05 PM

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