+ Reply to Thread
Results 1 to 6 of 6

Difference Between two dates

  1. #1
    Registered User
    Join Date
    10-30-2017
    Location
    England
    MS-Off Ver
    MS Office 2013
    Posts
    4

    Difference Between two dates

    Hi All,

    I have a Target Date and a date when a job was sent to a customer.

    Im trying to get a formula that calculates if a job was sent to a customer on time, or if there is a a positive / negative time variance.

    I am using =NETWORKDAYS(D10,I10) which is giving me the right results most of the time. The problem i am having is if i send work on the day it is due it is coming up with a 1. E.g. =NETWORKDAYS(07/12/2017,17/12/2017).

    Is it possible to change the formula slightly so if work is sent out on the day it is due to be the result is 0?

    Thanks in advance.

  2. #2
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,065

    Re: Difference Between two dates

    =NETWORKDAYS(start,end)-1 ?

    What do you consider =NETWORKDAYS("07/12/2017","11/12/2017") should return ? 2 or 3 days ?

    I suppose you could do this

    IF(D10=I10,0,NETWORKDAYS(D10,I10))
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  3. #3
    Forum Expert
    Join Date
    10-02-2014
    Location
    USA
    MS-Off Ver
    2016
    Posts
    1,222

    Re: Difference Between two dates

    Define "on-time". If its just that the difference between the day sent and due date is 0 or greater you dont need NETWORKDAYS. Just due date - send date. NETWORKDAYS is intended to calculate difference between dates in terms of work days between 2 dates (M-F, exclude optional holidays). I dont see any reason you need to ignore weekends in your calculations.

  4. #4
    Registered User
    Join Date
    10-30-2017
    Location
    England
    MS-Off Ver
    MS Office 2013
    Posts
    4

    Re: Difference Between two dates

    Thanks for this. The formula IF(D10=I10,0,NETWORKDAYS(D10,I10)) is working how i want it to mostly.

    Do you know how i could also put onto this formula to produce a blank cell if there is no data in D10?

  5. #5
    Forum Expert kersplash's Avatar
    Join Date
    11-22-2016
    Location
    Perth
    MS-Off Ver
    Home 2016 (Windows 10)/Work 2013 Pro Plus (Windows 10)
    Posts
    2,012
    Quote Originally Posted by andyjt1990 View Post
    Thanks for this. The formula IF(D10=I10,0,NETWORKDAYS(D10,I10)) is working how i want it to mostly.

    Do you know how i could also put onto this formula to produce a blank cell if there is no data in D10?
    Just add an IF(D10="","",your formula)

  6. #6
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,065

    Re: Difference Between two dates

    =if(d10="","",if(d10=i10,0,networkdays(d10,i10)))

+ 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] difference between 2 dates
    By Shamz41 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 07-16-2017, 02:11 AM
  2. [SOLVED] Difference between two dates
    By ckk403 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 01-24-2013, 06:02 PM
  3. Difference between dates
    By laqa in forum Excel General
    Replies: 2
    Last Post: 01-21-2011, 11:34 AM
  4. Excel 2007 : Difference between two dates (TAT)
    By Premmadaan in forum Excel General
    Replies: 2
    Last Post: 07-06-2010, 10:46 AM
  5. difference between dates
    By Ankur in forum Excel General
    Replies: 2
    Last Post: 08-06-2006, 12:20 PM
  6. difference between dates
    By dcccgoose in forum Excel General
    Replies: 3
    Last Post: 05-14-2006, 10:40 PM
  7. difference between two dates
    By dhouston1000 in forum Excel General
    Replies: 2
    Last Post: 08-24-2005, 07:05 AM

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