+ Reply to Thread
Results 1 to 7 of 7

Calculate working days between two dates for multiple tasks

  1. #1
    Registered User
    Join Date
    03-24-2016
    Location
    London, UK
    MS-Off Ver
    2016
    Posts
    32

    Calculate working days between two dates for multiple tasks

    Hi,

    I have 4 tasks that are done in an order. First task1, then task 2 so on. Each task takes certain number of days.

    I have calculated Start & End date for each task using MIN & MAX from a list dates from Sheet 1 (from the beginning of task 1 till the end of last task 4).


    For example

    Sheet 2

    A --------------- B --------------- C
    (Task) (Start Date - MIN) (End Date - MAX)

    Task 1 ------ 1-Jan --------- 6-Jan
    Task 2 ------ 7-Jan -------- 12-Jan
    Task 3 ------ 13-Jan -------- 14-Jan
    Task 4 ------ 15-Jan -------- 16-Jan

    Sheet 3

    In this sheet, I have a "column D" for Dates, starting from 1-Jan till 16-Jan (beginning of Task1 - end of task 4) D2:D17
    In the same sheet I have marked "W" for working day (works on Saturday as well), "H" for national holiday & "A" for Absent, "S"for Sunday in "column F"

    D -------- E ------- F

    1-Jan Friday ------ W
    2-Jan Saturday --- W
    3-Jan Sunday ----- S
    4-Jan Monday ----- H
    5-Jan Tuesday ---- A
    6-Jan Wednesday - W
    .
    .
    .
    16-Jan Saturday --- W

    Now, I want to calculate the number of working days ("W") between start & end date for each task. For Task1, it should first check if each cell in column D (D2:D17) is in between 1-Jan & 6-Jan, if yes, count "W" in column F.

    Task2, between 7-Jan & 12-Jan etc...
    Last edited by Quasar82; 03-24-2016 at 05:59 AM.

  2. #2
    Forum Contributor
    Join Date
    07-13-2015
    Location
    Poland
    MS-Off Ver
    MS Office 365
    Posts
    174

    Re: Calculate working days between two dates for multiple tasks

    Hi Quasar82,

    Write into sheet2, cell D1 formula:

    Please Login or Register  to view this content.
    Task1 in Sheet2 should be in row2

  3. #3
    Registered User
    Join Date
    03-24-2016
    Location
    London, UK
    MS-Off Ver
    2016
    Posts
    32

    Re: Calculate working days between two dates for multiple tasks

    Quote Originally Posted by zico8 View Post
    Hi Quasar82,

    Write into sheet2, cell D1 formula:

    Please Login or Register  to view this content.
    Task1 in Sheet2 should be in row2
    Hi,

    Thanks for quick reply.

    I have substituted my values to your formula (Sheet2 Cell AO10, colored blue, got result "0". It should be "5".

    Can you please check the attached XL file.

    I have another question, how do I count names in a list of names with lot of duplicates.
    Attached Files Attached Files

  4. #4
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 365 version 2501
    Posts
    18,847

    Re: Calculate working days between two dates for multiple tasks

    As to the first query,try pasting this formula in AO10:
    Please Login or Register  to view this content.
    EDIT: as to the second query, assuming the names are the artists on sheet one, paste the following array formula in Sheet1!G311, press the F2 key, press the Ctrl, Shift and Enter keys simultaneously (the formula will be automatically be wrapped in curly brackets):
    Please Login or Register  to view this content.
    Let me know if you have any questions.
    Last edited by JeteMc; 03-24-2016 at 10:54 AM. Reason: Added Edit portion
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  5. #5
    Registered User
    Join Date
    03-24-2016
    Location
    London, UK
    MS-Off Ver
    2016
    Posts
    32

    Re: Calculate working days between two dates for multiple tasks

    Quote Originally Posted by JeteMc View Post
    Let me know if you have any questions.
    Hi,

    First one worked flawless. Thank you so much.

    Second query worked too, but it returned #DIV/0! error when applied to cells that also contain blanks. (Column O & S in Sheet1).

  6. #6
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 365 version 2501
    Posts
    18,847

    Re: Calculate working days between two dates for multiple tasks

    Quote Originally Posted by Quasar82 View Post
    Second query worked too, but it returned #DIV/0! error when applied to cells that also contain blanks. (Column O & S in Sheet1).
    Modify the array formula (active with Ctrl, Shift and Enter) for G311 to read:
    Please Login or Register  to view this content.
    Copy to O311 and S311.
    Let me know if you have any questions.

  7. #7
    Registered User
    Join Date
    03-24-2016
    Location
    London, UK
    MS-Off Ver
    2016
    Posts
    32

    Re: Calculate working days between two dates for multiple tasks

    Quote Originally Posted by JeteMc View Post
    Modify the array formula (active with Ctrl, Shift and Enter) for G311 to read..... Copy to O311 and S311..
    I used this method instead, it worked.

    Please Login or Register  to view this content.
    I will try your formula.

+ 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] Calculate # working days between dates - Help!
    By ClairyBerry in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-09-2016, 08:25 PM
  2. [SOLVED] Formula needed to calculate working days in specified month between two dates
    By webfeet2 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 10-24-2013, 02:19 AM
  3. [SOLVED] How to calculate average total working days for tasks completion
    By Laras in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-19-2013, 06:38 AM
  4. Replies: 7
    Last Post: 06-19-2013, 05:45 AM
  5. Replies: 9
    Last Post: 10-17-2012, 10:33 PM
  6. Calculate weeks between two dates (working Days)
    By Zyphon in forum Excel General
    Replies: 6
    Last Post: 04-23-2008, 12:12 PM
  7. Is there a way to calculate business working days between dates i.
    By hjyoungii in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-23-2005, 01:06 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