+ Reply to Thread
Results 1 to 3 of 3

Merge 2 functions - DATEDIF and IF ...

Hybrid View

  1. #1
    Registered User
    Join Date
    06-03-2011
    Location
    Michigan
    MS-Off Ver
    Excel 2010
    Posts
    11

    Merge 2 functions - DATEDIF and IF ...

    Excel Date.jpg

    Greetings,

    I have two formulas that partially do what I want them to do, but can't figure out how to combine the two formulas to get the result I'm looking for.

    Open Date I Closed Date I Days Open

    First formula =DATEDIF(A1,B1,"d") Problem with this formula is a date has to be in cell B1 to function correctly, or else will get #NUM!.
    Other formula =IF(A1="","",TODAY()-A1) Gives me a count of open days and will stay blank if cell A1 is empty, but if I put a closed date in cell B2, it's not going to have any effect on the Days Open cell.

    What I want to happen is the ongoing count of days open, but when I add a closed date, then the count stops there.

    I hope that makes sense and would love to here what the solution is.

    Thanks

    Steve
    Last edited by NBVC; 01-14-2012 at 11:03 PM.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Merge 2 functions - DATEDIF and IF ...

    Maybe?

    =IF(B1="",IF(A1="","",TODAY()-A1),B1-A1)
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    06-03-2011
    Location
    Michigan
    MS-Off Ver
    Excel 2010
    Posts
    11

    Re: Merge 2 functions - DATEDIF and IF ...

    NBVC,

    Yep, that did the trick!

    Thank you!

+ 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