+ Reply to Thread
Results 1 to 6 of 6

Sum and separate the hours as a Normal,OT1,OT2 as required.

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

    Sum and separate the hours as a Normal,OT1,OT2 as required.

    Hi,

    Required a formula help to return a sum of hours like (Normal Hrs,OT1 Hrs,OT2 Hrs) in column R6:T10,as based on data available in column C:P

    Sample sheet with expected results are enclosed.


    Thanks,

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

    Re: Sum and separate the hours as a Normal,OT1,OT2 as required.

    Please try

    =LET(h,IF($C$5:$P$5="Hrs",C6:P10,),d,WEEKDAY($C$4:$P$4),c,SEQUENCE(COLUMNS(h),,,0),
    no,MMULT(IF(h>10,10,h),c),ot,MMULT(IF(d>1,IF(h>14,4,IF(h>10,h-10,)),),c),CHOOSE({1,2,3},no,ot,MMULT(h,c)-no-ot))

  3. #3
    Valued Forum Contributor
    Join Date
    07-23-2013
    Location
    London, England
    MS-Off Ver
    Office 365
    Posts
    988

    Re: Sum and separate the hours as a Normal,OT1,OT2 as required.

    I used some SUM and IF formulae to match your results.

    In R6: =SUM(IF($C$5:$P$5="Hrs",IF($C6:$P6<=10,$C6:$P6,10)))

    In S6: =SUM(IF($C$5:$P$5="Hrs",IF($C6:$P6>10,$C6:$P6-10,0)))-SUM(IF($C$5:$P$5="Hrs",IF($C6:$P6>14,$C6:$P6-14,0)))-SUM(IF($C$5:$P$5="Hrs",IF($C$3:$P$3="Sun",IF($C6:$P6>10,$C6:$P6-10,0))))

    In T6: =SUM(IF($C$5:$P$5="Hrs",IF($C6:$P6>14,$C6:$P6-14,0)))+SUM(IF($C$5:$P$5="Hrs",IF($C$3:$P$3="Sun",IF($C6:$P6>10,$C6:$P6-10,0))))

    (all copied down to other rows).
    Last edited by nick.williams; 03-03-2022 at 09:18 AM. Reason: Added formulae

  4. #4
    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,599

    Re: Sum and separate the hours as a Normal,OT1,OT2 as required.

    @Nick

    We ask that you include formulae within your post as well so that anyone unable to access the attachment will still be able to benefit. Please add these to your post. Thank you.
    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.

  5. #5
    Valued Forum Contributor
    Join Date
    07-23-2013
    Location
    London, England
    MS-Off Ver
    Office 365
    Posts
    988

    Re: Sum and separate the hours as a Normal,OT1,OT2 as required.

    Done, sorry.

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

    Re: Sum and separate the hours as a Normal,OT1,OT2 as required.

    Many thanks all of you for your nice solutions.

+ 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. Working hours, outside of normal hours?
    By Manchesterr in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 08-19-2021, 12:44 PM
  2. Replies: 4
    Last Post: 06-13-2018, 03:27 AM
  3. 8 hours per day is K10.00 and over time is 75% of normal hours
    By cbmawere in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-25-2016, 08:56 PM
  4. Needs to distribute spent hours to pick, normal and low hours.
    By bebo021999 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 10-28-2015, 10:36 PM
  5. [SOLVED] Formula to Calculate Normal Hours, Time & 1/2 & Double Time from Daily Hours per week
    By KazzICC in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-17-2014, 01:51 AM
  6. 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
  7. Algorithm matching clocked hours to required hours
    By lcg662 in forum Excel General
    Replies: 2
    Last Post: 12-23-2008, 03:19 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