+ Reply to Thread
Results 1 to 7 of 7

Need Help with finding out task hours

  1. #1
    Registered User
    Join Date
    10-29-2019
    Location
    India
    MS-Off Ver
    Office 365
    Posts
    3

    Question Need Help with finding out task hours

    Hello Forum,

    I am intermediate Excel User and need help with below

    My employees log their task hours through out the day and week (even on weekends and holidays)
    My "Y" column contains start time of their task and "Z" column contains end time of their task.
    Now my office working hours are Weekdays 0900-1800, excluding holidays.

    Now using the start time and end time they logged, I need to find, how many hours they worked outside 0900-1800 (that is working hours)
    If it is a weekend or holiday then that whole task time is outside working hours.

    Scenario 1: If a employee starts it's task at 1600 on a weekday and ends the task at 2100. He worked total of 5 hours but only 3 hours are outside working hours. I need these 3 hour calculation

    Scenario 2: If a employee starts it's task at 1600 on weekend/holiday and ends the task at 2100. He worked total of 5 hours and all these should be considered outside working hours.

    Please help with your expertise
    Thanks in advance!
    Attached Files Attached Files
    Last edited by SURAJAK; 10-29-2019 at 08:17 AM.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,460

    Re: Need Help with finding out task hours

    Welcome to the forum.

    Will you please attach a small sample Excel workbook? We are not able to work with or manipulate a picture of one and nobody wants to have to recreate your data from scratch.

    Instructions (Please Read Carefully):

    1. Make sure that your sample data are REPRESENTATIVE of your real data. The use of unrepresentative data is very frustrating and can lead to long delays in reaching a solution.

    2. Make sure that your desired results are also shown (mock up the results manually).

    3. Make sure that all confidential data is removed or replaced with dummy data first (e.g. names, addresses, E-mails, etc.).

    4. Try to avoid using merged cells as they cause lots of problems.

    Unfortunately the attachment icon doesn't work at the moment (it hasn't worked for years, and despite our repeatedly asking the technical team who own the forum to fix it, they can't be bothered to do so), so to attach an Excel file you have to do the following: just before posting, scroll down to Go Advanced and then scroll down to Manage Attachments. Now follow the instructions at the top of that screen.

    Please pay particular attention to point 2 (above): without an idea of your intended outcomes, it is often very difficult to offer appropriate advice.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    10-29-2019
    Location
    India
    MS-Off Ver
    Office 365
    Posts
    3

    Re: Need Help with finding out task hours

    Hi AliGW,

    Thanks for quick acknowledgement
    I have attached the excel with data and expected result in main thread

  4. #4
    Registered User
    Join Date
    10-30-2019
    Location
    Hong Kong
    MS-Off Ver
    2010
    Posts
    1

    Re: Need Help with finding out task hours

    All your project tracking data in one place to help you find non-profitable projects and stay

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,460

    Re: Need Help with finding out task hours

    Gamebaiv8 - do you have any solutions to offer? We expect more than just vague recommendations, but thanks for the contribution.

  6. #6
    Registered User
    Join Date
    10-29-2019
    Location
    India
    MS-Off Ver
    Office 365
    Posts
    3

    Re: Need Help with finding out task hours

    Thanks AliGW and Forum for looking into this issue.
    I actually worked out an formula using google searches.

    For people who may need this in future, below is the formula

    =(NETWORKDAYS(U2,V2,$AE$2:$AE$14)-1)*($AB$3-$AB$2)+IF(NETWORKDAYS(V2,V2,$AE$2:$AE$14),MEDIAN(MOD(V2,1),$AB$3,$AB$2),$AB$3)-MEDIAN(NETWORKDAYS(U2,U2,$AE$2:$AE$14)*MOD(U2,1),$AB$3,$AB$2)

    Where;
    U and V are start and end date.
    AB2 is start time of working hours which is 0900
    AB3 is end time of working hours which is 1800
    AE2 to AE14 are the list of holidays

    However, above formula gave me working hours and I was unable to derive non working hours formula directly
    So I created another cell which gave me total working hours which would be V-U
    and then I subtracted total hours and working hours which gave me non working hours.

    I tested this with various data including holidays, weekends etc and it works perfectly.

    Thanks everyone worked or are working on this!

  7. #7
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,460

    Re: Need Help with finding out task hours

    Thanks for letting us know.

    If that takes care of your original question, please select Thread Tools from the menu link above and 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. Finding Ship Times based on Hours of Shipper and Hours of Receiver
    By kmsagent in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-01-2019, 02:31 AM
  2. Calculate start date & time of task (working hours)
    By kaaver in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 03-30-2016, 10:56 AM
  3. Replies: 2
    Last Post: 12-02-2015, 09:08 AM
  4. [SOLVED] Finding the Earliest and Latest Dates for each Task Code
    By BenTFleury in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 10-07-2014, 03:45 PM
  5. Replies: 2
    Last Post: 08-19-2013, 11:19 AM
  6. Excel to save every 3 to 4 hours and at a specific time everyday perform a task
    By vonallmen9988 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-06-2013, 03:45 PM
  7. Min & Max Due dates for Task Working Hours
    By Kolacube in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 05-21-2008, 12:02 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