+ Reply to Thread
Results 1 to 5 of 5

Issues with computing the number of working days, excluding weekends/holidays

  1. #1
    Forum Contributor
    Join Date
    05-20-2017
    Location
    Boston, US
    MS-Off Ver
    Mac 2011
    Posts
    139

    Issues with computing the number of working days, excluding weekends/holidays

    Hello!

    I am trying to find the way to compute the number of working days spent on fulfilling the task, but I don't understand how to achieve the correct result. WORKDAY function seems not to be a good solution for my case.

    Here is the description:

    In column B I have start days for each particular task
    In column C I have the number of working days I plan to dedicate to the task
    In column D I want to compute the end date based on the start day plus working days - holidays/weekends.

    For example:

    B12 January 2 2017
    C12 15
    Then if I know the exact amount of off days in January (for example, 14 off days stored in cell B25) I can easily use the following formula:

    =IF(B12="","",WORKDAY(B12,C12,B25))

    to get the end date January 23 2017

    But some of the tasks can extend over a month and a half, or two, or three, etc, months. And as I need this formula to be dynamic, it doesn't make sense to use the formula if I need to compute the end date manually taking into account how many months the task takes.

    I have tried to create a list of all "off" days during the year, and store them, for example, store them in B25:B40:

    January 6 2017
    February 14 2017
    March 8 2017

    etc.

    and then use this formula:

    =IF(B12="","",WORKDAY(B12,C12,B25:B40))

    But that doesn't do the job, because I assume the formula doesn't discern the months, and simply subtracts all these dates as holidays from each task.

    For example:

    B12 January 2 2017
    C12 36
    Then if I know the exact amount of off days in January (for example, 14 off days stored in cell B25) I can easily use the following formula:

    =IF(B12="","",WORKDAY(B12,C12,B25:B40))

    will subtract the number of all off days stored in B25:B40 (not only the ones I need to subtract, namely off days in January and part of February), and I will end up with a wrong date.

    Please, help me to solve the problem.

    I will be very grateful for your help.

    Thank you!

  2. #2
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,944

    Re: Issues with computing the number of working days, excluding weekends/holidays

    That is the correct formula - I think you are just mis-interpreting how to use holidays. Holidays are specific dates 1/1/2017, 2/12/2017, 7/4/2017 etc. not the number of holidays per month.
    Bernie Deitrick
    Excel MVP 2000-2010

  3. #3
    Forum Contributor
    Join Date
    05-20-2017
    Location
    Boston, US
    MS-Off Ver
    Mac 2011
    Posts
    139

    Re: Issues with computing the number of working days, excluding weekends/holidays

    Quote Originally Posted by Bernie Deitrick View Post
    That is the correct formula - I think you are just mis-interpreting how to use holidays. Holidays are specific dates 1/1/2017, 2/12/2017, 7/4/2017 etc. not the number of holidays per month.
    Thank you for your reply. I did use this format of holidays. I will now try it again. You see, all my previous attempts did subtract all holidays of the whole year, not only those for a particular period. Do you say that this WORKDAY formula does discern months and takes holidays only of the specific period.

  4. #4
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,944

    Re: Issues with computing the number of working days, excluding weekends/holidays

    Yes - here is your formula's result before, after adding a holiday outside the period, and after adding a holiday inside the period:
    Capture.JPG

  5. #5
    Forum Contributor
    Join Date
    05-20-2017
    Location
    Boston, US
    MS-Off Ver
    Mac 2011
    Posts
    139

    Re: Issues with computing the number of working days, excluding weekends/holidays

    Quote Originally Posted by Bernie Deitrick View Post
    That is the correct formula - I think you are just mis-interpreting how to use holidays. Holidays are specific dates 1/1/2017, 2/12/2017, 7/4/2017 etc. not the number of holidays per month.
    I am sorry. I did work now. Thank you very much.

+ 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. Replies: 0
    Last Post: 10-31-2014, 10:32 AM
  2. Replies: 4
    Last Post: 05-19-2014, 04:28 PM
  3. Add X Days To Dates, Excluding Weekends and Holidays
    By sianjialin in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-07-2014, 11:46 PM
  4. Replies: 7
    Last Post: 06-19-2013, 05:45 AM
  5. Calculate number of days excluding holidays and weekends
    By david1987 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-05-2012, 08:17 AM
  6. Calculate number of days, excluding weekends and holidays
    By cloyd in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-26-2012, 04:37 PM
  7. Calculate number of business days excluding weekends and holidays?
    By sethi85 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-07-2007, 02:11 PM

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