+ Reply to Thread
Results 1 to 6 of 6

Calculate no. of workdays excluding holidays & employee vacations

  1. #1
    Registered User
    Join Date
    10-05-2018
    Location
    Manila, Philippines
    MS-Off Ver
    MS Excel 2016
    Posts
    2

    Calculate no. of workdays excluding holidays & employee vacations

    Hello everyone.

    I have been asked to create a simple tracker in our office which will let us determine the estimated finish date of a task assigned to the employees.

    I am working on a workbook that has 3 worksheets similar to what is shown below:


    Sheet 1:
    ********
    Employee ID Days Start date Finish Date
    11111 7 10/31/2018 ????
    22222 3 10/10/2018 ????
    33333 7 10/31/2018 ????


    Sheet 2:
    ********
    Date Holiday
    11/01/2018 All Saints Day
    12/25/2018 Christmas
    01/01/2019 New Year


    Sheet 3:
    ********
    Employee ID Date of Vacation
    11111 11/03/2018
    11111 11/04/2018
    22222 10/11/2018
    33333 11/03/2018


    Basically, I need to determine the value of the Finish Date column in Sheet 1, but I also need to exclude the holidays in Sheet 2 and the vacation dates taken by the employees which is in sheet 3.

    I know I can use the WORKDAY(start_date, days, [holidays]) function for this, but I am having trouble combining the holiday and vacation lists to be used as exclusion.

    I'd like to ask for some advice on how to accomplish this.
    Last edited by lester777; 10-05-2018 at 10:35 AM. Reason: Tagged as solved

  2. #2
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Calculate no. of workdays excluding holidays & employee vacations

    Hello and welcome to the forum.

    Try this in Sheet1!D2:

    =WORKDAY(WORKDAY(C3,B3,Sheet2!A$2:A$4),COUNTIFS(Sheet3!A:A,A3,Sheet3!B:B,">="&C3,Sheet3!B:B,"<="&WORKDAY(C3,B3,Sheet2!A$2:A$4)))
    Last edited by 63falcondude; 10-05-2018 at 09:54 AM.

  3. #3
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: Calculate no. of workdays excluding holidays & employee vacations

    Please check attached file


    D2 =WORKDAY(C2,B2,IFERROR(CHOOSE({1,2},$F$2:$F$4,OFFSET($J$1,MATCH(A2,$I$2:$I$5,),,COUNTIF($I$2:$I$5,A2))),""))
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    10-05-2018
    Location
    Manila, Philippines
    MS-Off Ver
    MS Excel 2016
    Posts
    2

    Re: Calculate no. of workdays excluding holidays & employee vacations

    Wow, that was fast
    Both solutions given are working. I don't quite understand how they work yet, but I'll try to do some more reading in order to understand them.
    Thank you 63falcondude and Bo_Ry.

  5. #5
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Calculate no. of workdays excluding holidays & employee vacations

    You're welcome. Thanks for the rep!

    The formula from post #2 starts with a normal WORKDAY function that only uses the company-wide holidays.

    The COUNTIFS function counts the number of rows where that employee is found in the sheet with the vacation days (where those vacation days lie between the start and end dates).

    The outermost WORKDAY function adds the number of days from the COUNTIFS function to the original WORKDAY function thus including both vacation days and holidays.

  6. #6
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: Calculate no. of workdays excluding holidays & employee vacations

    IFERROR(CHOOSE({1,2},$F$2:$F$4,OFFSET($J$1,MATCH(A2,$I$2:$I$5,),,COUNTIF($I$2:$I$5,A2))),"")
    This is for combine holiday and vacation together

    Choose ({1,x}, $F$2:$F$4,xx) is holiday
    Chose ({x,2}, xx,OFFSET($J$1,MATCH(A2,$I$2:$I$5,),,COUNTIF($I$2:$I$5,A2)) is for vacation for each ID.

    IFERROR is needed if holiday and vacation is not same dimension, the exceed one will give #N/A! and iferror will change error to ""

+ 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. Workdays per month excluding holidays help required with Formula
    By nion64 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-21-2018, 06:29 AM
  2. Replies: 10
    Last Post: 01-26-2017, 06:43 PM
  3. [SOLVED] IF Forumla Excluding Workdays & Holidays
    By TRUCKING123 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-06-2016, 03:15 PM
  4. Replies: 4
    Last Post: 04-16-2014, 04:17 AM
  5. workdays between (excluding holidays)
    By imaccormick1990 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-22-2013, 08:26 AM
  6. Convert Hours to Workdays, Excluding Holidays
    By mycon73 in forum Excel General
    Replies: 4
    Last Post: 08-21-2012, 11:57 AM
  7. Calculate workdays between two dates (including Saturdays, excluding holidays)
    By Sean Anderson in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 04-12-2007, 12:22 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