+ Reply to Thread
Results 1 to 4 of 4

Subtract two dates to get # of week days - networkdays does not quite work

  1. #1
    Registered User
    Join Date
    08-03-2012
    Location
    Edmonston, MD
    MS-Off Ver
    Excel 2007
    Posts
    2

    Subtract two dates to get # of week days - networkdays does not quite work

    Hi All,

    I am trying to find a formula that will return the number of week days between two dates. My specific situation is that my job sets up work orders (WO) to be completed by our staff. We have 3 dates - the date the WO was created, the date the WO is due to be completed, and the date the WO was actually completed.

    I would like to subtract the Complete date from the Due date. Generally, this should always equal zero because our staff should be completing WOs on the due date! But obviously that doesn't always happen. There are times that they complete them late, and times they complete them early (yay!).

    The problem with NETWORKDAYS is that even when they are completed on time, the result is 1. This formula counts instead of subtracts. I adjusted the formula to =NETWORKDAYS(A3,A4)-1 which works fine for those WOs completed on time or completed late. But for those completed early, it adds (or subtracts, really) 2 days. So for a WO completed a day early, instead of it showing -1, it shows -3. I've attached an example of WOs and the NETWORKDAYS formula I've used so you can see.

    Subtract Days.xls

    I'm really looking for something that will subtract week days, not count them. Any help would be greatly appreciated!!

  2. #2
    Forum Moderator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 2209 64-bit
    Posts
    21,680

    Re: Subtract two dates to get # of week days - networkdays does not quite work

    This formula is a little kludgy but it does what you're describing:

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Jeff
    | | |?| |?| |?| |?| | |:| | |?| |?|
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Registered User
    Join Date
    08-03-2012
    Location
    Edmonston, MD
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Subtract two dates to get # of week days - networkdays does not quite work

    This works, perfectly...thank you!!

  4. #4
    Forum Moderator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 2209 64-bit
    Posts
    21,680

    Re: Subtract two dates to get # of week days - networkdays does not quite work

    You are very welcome! If your question has been answered please mark your thread as "Solved" so that members will know by looking at the thread title that your problem is solved.

    Go to the menu immediately above your first post to the thread and click on Thread Tools. From the dropdown menu select "Mark this thread as solved..."

+ 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. formula to subtract the days in two dates
    By hcastro in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-09-2013, 01:35 AM
  2. Calculate the difference between 2 working days - NETWORKDAYS does not work exactly
    By jamesbaker1979 in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 04-30-2013, 09:39 AM
  3. [SOLVED] Subtract Two Dates By The Number of Days, But Only Inlcude Work Days
    By ptho16 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-16-2012, 11:31 AM
  4. Replies: 15
    Last Post: 06-17-2011, 03:37 PM
  5. Subtract time between certain days/work hours?
    By lisa b. in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-17-2006, 04:30 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