+ Reply to Thread
Results 1 to 4 of 4

Date Difference Formula

  1. #1
    Registered User
    Join Date
    09-12-2007
    Location
    UK, Reading.
    MS-Off Ver
    All 2003
    Posts
    14

    Smile Date Difference Formula

    Hi

    I have a date subtraction problem to solve.

    Two columns may contain dates, in the third column I want to calculate the date difference.

    First column will contain the date something was submitted for approval.

    Second column will contain the date of approval.

    If neither date is available the 3rd column should show no result.

    If both dates are available the 3rd column should show the date difference, in net working days.

    If only 1st date available 3rd column should show difference in days between that date and todays date, result in networking days.

    If only 2nd date is available 3rd column should show no result or ideally an error message as approval is not actually possible without submission.

    In summary:

    Column 1 Column 2 Column 3
    Blank Blank Blank

    Date Date Networkdaysdifference

    Date Blank Networkdays between date and todays date

    Blank Date Blank or Error message.

    So far I have created a formula to test for each of the cases individually but can’t find a way to combine both of these.

    The formulae I have for column 3 are:

    =IF(AND(ISNUMBER(A2),ISBLANK(B2)),NETWORKDAYS(A2,TODAY())," ")

    or

    =IF(AND(ISNUMBER(A2),ISNUMBER(B2)),NETWORKDAYS(A2,B2)," ")

    If anyone can resolve this I’d be very grateful.

    Best regards.

    Henry Thompson.
    Resource Planner.
    Last edited by henrythompson; 09-12-2007 at 12:02 PM.

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

    Please Login or Register  to view this content.
    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
    09-12-2007
    Location
    UK, Reading.
    MS-Off Ver
    All 2003
    Posts
    14

    Thumbs up Thanks...

    Hi, many thanks, I'm very grateful, I spent an age in this yesterday and in the end wasn't getting anywhere fast, I've also a very grateful colleague, cheers, Henry.

  4. #4
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675
    You could also try

    =IF(ISNUMBER(A2),NETWORKDAYS(A2,IF(ISNUMBER(B2),B2,TODAY())),"")

+ 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