+ Reply to Thread
Results 1 to 13 of 13

Separate the quantity working hours as a Normal,OT1,OT2,Sundays and Holidays as required

  1. #1
    Forum Contributor
    Join Date
    08-19-2020
    Location
    Dubai
    MS-Off Ver
    Office365
    Posts
    131

    Separate the quantity working hours as a Normal,OT1,OT2,Sundays and Holidays as required

    Hi,


    I need a formula help to calculate a sum of hours such as (Normal Hours, OT1 Hours, OT2 Hours, Sundays, and Holiday Hours) in column W6:Z10 based on data in column C:V.


    Sample sheet with expected results are enclosed.


    Thanks,

  2. #2
    Registered User
    Join Date
    02-28-2012
    Location
    Bangalore
    MS-Off Ver
    Excel 2010
    Posts
    100

    Re: Separate the quantity working hours as a Normal,OT1,OT2,Sundays and Holidays as requir

    Hi. Good Day.

    Please find attached the excel. The values that's arrived out of the formula here is the logic you have asked for. Verify the data manually for first line item. ID 12312.
    There are totally only 3 days where it's less than or equal to 10 hours. The total you summed up gives 50?

    In the formula - i have shared here gives the values as per the needs you placed in post. Share the Sunday's date List. The same can be adopted.

    Please note all the hourly cells are covered in the formula framed.

    Let me know, if this is what you are looking for or what needs to be done.

    Thank You.

    Regards.
    Perpectuals

  3. #3
    Forum Contributor
    Join Date
    08-19-2020
    Location
    Dubai
    MS-Off Ver
    Office365
    Posts
    131

    Re: Separate the quantity working hours as a Normal,OT1,OT2,Sundays and Holidays as requir

    Thanks for the reply,

    The hours up to or less than 10 are considered normal working hours on all days except Sundays and holidays; if the hours exceed 10 in a normal day (example: 15 working hours in a normal day 10 are normal working hours, 4 are OT1 hours, 1 is OT2 hours)

    OT1 hours are between 10 hours and 14 hours, in a normal working day (14-10=4 or 12-10=2 etc.)

    In normal working days, OT2 hours are between 14 and 24 (16-14=2, 18-14=4 etc.)

    The total hours of Sundays and holidays are considered as OT2 hours.


    Thanks,

  4. #4
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,152

    Re: Separate the quantity working hours as a Normal,OT1,OT2,Sundays and Holidays as requir

    VBA ...
    Please Login or Register  to view this content.
    Hoildays in named range "Holidays"

    in W16

    =get_hours($C$4:$V$4,$C6:$V6,Holidays,COLUMN(A$1))

    drag across
    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

  5. #5
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,078

    Re: Separate the quantity working hours as a Normal,OT1,OT2,Sundays and Holidays as requir

    A formula solution
    In W6 dragged down
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    and in Z6
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  6. #6
    Forum Contributor
    Join Date
    08-19-2020
    Location
    Dubai
    MS-Off Ver
    Office365
    Posts
    131

    Re: Separate the quantity working hours as a Normal,OT1,OT2,Sundays and Holidays as requir

    Many thanks to all of you for your respective solutions.

    As such, I am seeking a single cell formula to return results in four columns at once, or a normal formula to return results in each column separately.

    I would appreciate it if someone could look into my request.

  7. #7
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,078

    Re: Separate the quantity working hours as a Normal,OT1,OT2,Sundays and Holidays as requir

    What is wrong with the two formulae I suggested?

  8. #8
    Forum Contributor
    Join Date
    08-19-2020
    Location
    Dubai
    MS-Off Ver
    Office365
    Posts
    131

    Re: Separate the quantity working hours as a Normal,OT1,OT2,Sundays and Holidays as requir

    Quote Originally Posted by Fluff13 View Post
    What is wrong with the two formulae I suggested?
    Yes, that's fine, I'm just looking for column z results to also be included in one cell formula or a normal formula that returns the results in each column separately for ease of understanding.

  9. #9
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,078

    Re: Separate the quantity working hours as a Normal,OT1,OT2,Sundays and Holidays as requir

    Not sure I understand why, but for W
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    for X
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    and for Y
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  10. #10
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,410

    Re: Separate the quantity working hours as a Normal,OT1,OT2,Sundays and Holidays as requir

    Quote Originally Posted by Mohammad Munawar View Post
    I'm just looking for .... for ease of understanding.
    If easy understanding of the formulas is important, then I would suggest you to reorganize your sheet. Is that acceptable to you?
    Last edited by HansDouwe; 08-07-2022 at 10:19 AM.

  11. #11
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,410

    Re: Separate the quantity working hours as a Normal,OT1,OT2,Sundays and Holidays as requir

    Here is a solution with only easy understanding formulas.
    I've left the structure of your sheet intact, but I've only added auxiliary help rows.
    Is this solution going in the right direction for you?
    Do you have questions about the formulas?
    Please feedback.
    Last edited by HansDouwe; 08-07-2022 at 12:58 PM.

  12. #12
    Forum Contributor
    Join Date
    08-19-2020
    Location
    Dubai
    MS-Off Ver
    Office365
    Posts
    131

    Re: Separate the quantity working hours as a Normal,OT1,OT2,Sundays and Holidays as requir

    Thank you for addressing this formula solution in the simplest way, and all these formulas work well with shorter data, but with larger data, it would be difficult to separate work days and holidays, Sundays that in thousands of rows.

  13. #13
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,410

    Re: Separate the quantity working hours as a Normal,OT1,OT2,Sundays and Holidays as requir

    Thx for the feedback and the rep.

    My solution is also suitable for many rows. See attachment.
    You just need to copy the rows.

    If you want I can throw out the auxiliary help rows again, but instead more complicated formulas arise.
    It is what your wish is for.
    Last edited by HansDouwe; 08-07-2022 at 02:29 PM.

+ 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. Sum and separate the hours as a Normal,OT1,OT2 as required.
    By Mohammad Munawar in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-03-2022, 11:52 AM
  2. [SOLVED] Finding the Difference in Hours Calculations excluding Sundays and Business Holidays
    By chandramouliarun in forum Excel Formulas & Functions
    Replies: 21
    Last Post: 03-10-2021, 09:50 AM
  3. Replies: 4
    Last Post: 06-13-2018, 03:27 AM
  4. Normal working hours calculation by day
    By harignz in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 10-26-2015, 12:32 AM
  5. Calculation of business hours exculding sundays and holidays
    By balundl in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 01-30-2014, 01:17 PM
  6. Replies: 2
    Last Post: 06-14-2013, 10:45 AM
  7. If time period falls outside of normal working hours how many hours does it add.
    By chrisdromey in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-02-2013, 11:56 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