+ Reply to Thread
Results 1 to 14 of 14

Subtract between two dates in a row only counting weekdays, and drag formula down rows

  1. #1
    Registered User
    Join Date
    06-18-2013
    Location
    Minneapolis, MN
    MS-Off Ver
    Excel 2013
    Posts
    81

    Subtract between two dates in a row only counting weekdays, and drag formula down rows

    Can anyone help me to subtract between two dates in a row only counting work days, and drag the formula down rows?

    Thanks!

    attached is an exampleFloor Deadline Performance Chart 6.19.13.xlsx

  2. #2
    Registered User
    Join Date
    05-28-2013
    Location
    CT
    MS-Off Ver
    Excel 2010
    Posts
    90

    Re: Subtract between two dates in a row only counting weekdays, and drag formula down rows

    I assume you are filling out Column H.

    Try:
    Please Login or Register  to view this content.
    . It will check to make sure that there is a number in cell F2, and then if it is true, it will give the date between the complete and the Date Sent to Floor. Otherwise, it will say "Incomplete" for jobs that do not yet have a complete date.

    Also, you may need to make sure you format the cells properly. If you are getting errors or incorrect answers, format them as "Number".

  3. #3
    Registered User
    Join Date
    06-18-2013
    Location
    Minneapolis, MN
    MS-Off Ver
    Excel 2013
    Posts
    81

    Re: Subtract between two dates in a row only counting weekdays, and drag formula down rows

    Thank you so much for helping Pynergee!

    Do you know if that formula can be adjusted so that it states "incomplete" if a due date is listed (column [E]), however, remaining blank if no information is in column [E]?



  4. #4
    Registered User
    Join Date
    05-28-2013
    Location
    CT
    MS-Off Ver
    Excel 2010
    Posts
    90

    Re: Subtract between two dates in a row only counting weekdays, and drag formula down rows

    Please Login or Register  to view this content.
    That should work. It will only go to column E if the complete date hasn't been filled in, otherwise it will list the difference in days.

  5. #5
    Registered User
    Join Date
    06-18-2013
    Location
    Minneapolis, MN
    MS-Off Ver
    Excel 2013
    Posts
    81

    Re: Subtract between two dates in a row only counting weekdays, and drag formula down rows

    This works Great! I'm very happy with this! However, do you know how to adjust the formula so that only weekdays are included?

  6. #6
    Registered User
    Join Date
    05-28-2013
    Location
    CT
    MS-Off Ver
    Excel 2010
    Posts
    90

    Re: Subtract between two dates in a row only counting weekdays, and drag formula down rows

    That I'm not too sure of... I can't see any usage of the Workday formula, but the only way you may be able to do it is to include the WEEKDAY formula and also a few IF statements for if the WEEKDAY formula outputs a 1 or a 7, for sunday or saturday. I can't be 100% though. Perhaps someone else would be more helpful with that.

  7. #7
    Registered User
    Join Date
    06-18-2013
    Location
    Minneapolis, MN
    MS-Off Ver
    Excel 2013
    Posts
    81

    Re: Subtract between two dates in a row only counting weekdays, and drag formula down rows

    Alright, I'll mark this as solve and repost with a more specific question asking for modification to your given formula. Thanks!!

  8. #8
    Forum Expert Kevin UK's Avatar
    Join Date
    12-07-2010
    Location
    Radstock, Somerset
    MS-Off Ver
    365
    Posts
    1,922

    Re: Subtract between two dates in a row only counting weekdays, and drag formula down rows

    Hi Shrad013

    Look into the NETWORKDAYS function to exclude the weekends.
    Regards Kevin


    Merged Cells (They are the work of the devil!!!)

  9. #9
    Registered User
    Join Date
    06-18-2013
    Location
    Minneapolis, MN
    MS-Off Ver
    Excel 2013
    Posts
    81

    Re: Subtract between two dates in a row only counting weekdays, and drag formula down rows

    Thanks Kevin,

    I looked into it a bit, but I am unsure of how to integrate it into my current formula.

    =IF(ISNUMBER(F2),F2-D2,IF(ISNUMBER(E2),"Incomplete"," "))

  10. #10
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Subtract between two dates in a row only counting weekdays, and drag formula down rows

    Try like this

    =IF(ISNUMBER(F2),NETWORKDAYS(D2,F2)-1,IF(ISNUMBER(E2),"Incomplete",""))

    Note that NETWORKDAYS will always include both start and end date, so if D2 is a Thursday and F2 the following day that will count as 2.....so you might want to deduct 1, shown in red
    Audere est facere

  11. #11
    Registered User
    Join Date
    06-18-2013
    Location
    Minneapolis, MN
    MS-Off Ver
    Excel 2013
    Posts
    81

    Re: Subtract between two dates in a row only counting weekdays, and drag formula down rows

    Daddylonglegs,

    When I tried your formula, the output generated was 29597
    29598
    29604
    29603
    29604
    29608
    29624
    29601
    29595
    29597... etc. Here is my work book.
    Attached Files Attached Files

  12. #12
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Subtract between two dates in a row only counting weekdays, and drag formula down rows

    You've now changed the columns from your original attachment so the cell references need to be altered accordingly - is it correct that you have some completed dates that are earlier than "Date sent to floor"? what do you expect the result to be in such cases, e.g. row 2?

  13. #13
    Registered User
    Join Date
    06-18-2013
    Location
    Minneapolis, MN
    MS-Off Ver
    Excel 2013
    Posts
    81

    Re: Subtract between two dates in a row only counting weekdays, and drag formula down rows

    =IF(ISNUMBER(G2),G2-E2+1,IF(ISNUMBER(F2),"INCOMPLETE"," ")) has solved it! Thanks!

  14. #14
    Registered User
    Join Date
    06-18-2013
    Location
    Minneapolis, MN
    MS-Off Ver
    Excel 2013
    Posts
    81

    Re: Subtract between two dates in a row only counting weekdays, and drag formula down rows

    Also,

    I have gotten your formula to work!

    =IF(ISNUMBER(G2),NETWORKDAYS(E2,G2),IF(ISNUMBER(F2),"Incomplete",""))

    with F2 as Due Date, E2 as Start Date, and G2 as date completed!

    Thanks!

    Thanks

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

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