+ Reply to Thread
Results 1 to 4 of 4

DATEDIF when second date might be blank

  1. #1
    Registered User
    Join Date
    07-01-2010
    Location
    Dallas, Tx
    MS-Off Ver
    Excel 2003
    Posts
    3

    DATEDIF when second date might be blank

    I have a spreadsheet for issues where there is an open date (B3) and close date (C3). I want to calculate the date difference between these two dates (D3) in days. Until the issue is closed, C3 will be blank. I have =DATEDIF(B3,TODAY(),"d") for the instance where C3 is blank and I have =DATEDIF(B3,C3,"d") for the instance where C3 has a date, but I would like 1 formula that would incorporate both circumstances.

    Any help is appreciated.

  2. #2
    Registered User
    Join Date
    02-19-2010
    Location
    Kansas, USA
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: DATEDIF when second date might be blank

    Please Login or Register  to view this content.
    Note that TODAY() is volatile. It is best to avoid having volatile functions in many cells. If that is in more than ~1250 cells then your calculation times will suffer. You may want to just display N/A or something like that (Open, or Not Closed).

    Please Login or Register  to view this content.
    Looks like you may be missing some right hand parentheses, too.
    Last edited by 2Busy; 07-01-2010 at 05:23 PM.

  3. #3
    Registered User
    Join Date
    03-14-2015
    Location
    Earth
    MS-Off Ver
    2007
    Posts
    4

    Re: DATEDIF when second date might be blank

    Hi, same proble As i have. I hope someone can help me. Im replying an old thread

    My Spreadsheet

    I have 2 dates
    Date Received (E4)
    Date Dispatch (G4)


    As usual I want to know how many days being open if G4 is a blank cell. the formula is on H4.

    what is the formula.?

    what i have is =IF(G4="",E4,DATEDIF(E4,G4,"d")) but the input date is not in days. its a Date.

    pleas help me.

    Thanks.

  4. #4
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,461

    Re: DATEDIF when second date might be blank

    Unfortunately your post does not comply with Rule 2 of our Forum RULES. Do not post a question in the thread of another member -- start your own thread.

    If you feel an existing thread is particularly relevant to your need, provide a link to the other thread in your new thread.

    Old threads are often only monitored by the original participants. New threads not only open you up to all possible participants again, they typically get faster response, too.
    Quang PT

+ 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