+ Reply to Thread
Results 1 to 10 of 10

Calculating Saturday hours to correct overtime - bigger brains than mine required!

  1. #1
    Registered User
    Join Date
    01-09-2013
    Location
    Sydney, Australia
    MS-Off Ver
    2018
    Posts
    27

    Calculating Saturday hours to correct overtime - bigger brains than mine required!

    Hi there

    Any help would be very much appreciated! I have a spreadsheet (attached) I have used for many years (with the help of you guys at the time) but now there has been a change in the way my guys have to be paid on Saturdays.

    Existing conditions in the attached were:

    Monday to Friday the first 8 hours = Basic Hours
    Monday to Friday >8, <=10 = Time & Half
    Monday to Friday >12 = Double
    Saturday = All Time & Half
    Sunday = All Double

    HOWEVER... now every Saturday the first two hours are paid Time and Half and thereafter they are on Double Time.

    ie: New Condition is Saturday <=2 = Time & Half thereafter >2 = Double

    What changes do I need to make to the Time & Half formula, please!

    Basic Hours =SUMIFS(J3:W3,J$2:W$2,">1",J$2:W$2,"<7",J3:W3,"<=8")+COUNTIFS(J$2:W$2,">1",J$2:W$2,"<7",J3:W3,">8")*8

    Time & Half =SUMIFS(J3:W3,J$2:W$2,">1",J$2:W$2,"<7",J3:W3,">8",J3:W3,"<=10")-(COUNTIFS(J$2:W$2,">1",J$2:W$2,"<7",J3:W3,">8",J3:W3,"<=10")*8)+COUNTIFS(J$2:W$2,">1",J$2:W$2,"<7",J3:W3,">10")*2+SUMIF(J$2:W$2,7,J3:W3)

    Double =SUMIFS(J3:W3,J$2:W$2,">1",J$2:W$2,"<7",J3:W3,">10")-(COUNTIFS(J$2:W$2,">1",J$2:W$2,"<7",J3:W3,">10")*10) +SUMIFS(J3:W3,J$2:W$2,1)


    Pierre
    Attached Files Attached Files

  2. #2
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,915

    Re: Calculating Saturday hours to correct overtime - bigger brains than mine required!

    X3=SUMPRODUCT((WEEKDAY(J$1:W$1,2)<6)*(J3:W3>=8))*8+SUMPRODUCT((WEEKDAY(J$1:W$1,2)<6)*(J3:W3<8)*(J3:W3))

    Y3=SUMPRODUCT((WEEKDAY(J$1:W$1,2)<6)*(J3:W3>=10))*2+SUMPRODUCT((WEEKDAY(J$1:W$1,2)<6)*(J3:W3>8)*(J3:W3<10)*(J3:W3-8))+SUMPRODUCT((WEEKDAY(J$1:W$1,2)=6)*(J3:W3>=2))*2+SUMPRODUCT((WEEKDAY(J$1:W$1,2)=6)*(J3:W3<2)*(J3:W3))

    Z3=SUM(J3:W3)-X3-Y3
    Try this and copy towards down
    Samba

    Say thanks to those who have helped you by clicking Add Reputation star.

  3. #3
    Registered User
    Join Date
    01-09-2013
    Location
    Sydney, Australia
    MS-Off Ver
    2018
    Posts
    27

    Re: Calculating Saturday hours to correct overtime - bigger brains than mine required!

    Hey

    One flaw which I didn't not flag earlier, sorry. Sometimes there will be text in the cells. Ie: someone is "sick" (AA) there is conditional formatting to count that or "hols" (AB). Thereafter it being a work spreadsheet there can be general text written in as reminders etc.

    So though brilliant, text entered into any cells means it returns an error. Damn! Help!

    Pierre

  4. #4
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,812

    Re: Calculating Saturday hours to correct overtime - bigger brains than mine required!

    See if modifying the X3 and Y3 formulas* as follows helps:
    X3
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Y3
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    *Note that both formulas are now array entered meaning that they have to be confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula.
    Let us know if you have any questions.
    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
    01-09-2013
    Location
    Sydney, Australia
    MS-Off Ver
    2018
    Posts
    27

    Re: Calculating Saturday hours to correct overtime - bigger brains than mine required!

    Hi JeteMc

    The Array doesn't do much my end - I am working off a mac so imagine that makes a difference, however the formulae work upto a point...

    I have attached the xls and you 'll se everything works great, unless I put hours in which are <8 in the weekdays - the hours go into the Double time column(Z)! Go figure...any ideas?

    B

  6. #6
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,812

    Re: Calculating Saturday hours to correct overtime - bigger brains than mine required!

    If you array enter the formula in cell X9 it will change the value to 62, which in turn changes the value in Z9 to 28 (which is correct if I understand post #1). Array entering the formula in Y9 doesn't change the result (4) however if you'll select that cell and utilize the Evaluate Formula feature both before and after array entering the formula you'll see that there is a difference in the way it calculates the second and fourth occurrence of the SUMPRODUCT function.
    Let us know if you have any questions.

  7. #7
    Registered User
    Join Date
    01-09-2013
    Location
    Sydney, Australia
    MS-Off Ver
    2018
    Posts
    27

    Red face Re: Calculating Saturday hours to correct overtime - bigger brains than mine required!

    Ah well yes, I have absolutely no idea what you've just told me there. Totally gone over my head, I'm afraid....

  8. #8
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,812

    Re: Calculating Saturday hours to correct overtime - bigger brains than mine required!

    Sorry about that. I assume that you highlighted cell Z9 to illustrate the issue with the double overtime. My comment was that if you array enter cell X9 the value displayed there will change from 40 to 62 and that the value in cell Z9 will change from 50 to 28. I have array entered both of the formulas in cells X9 and Y9 so that you can see what I mean.
    Let us know if you have any questions.

  9. #9
    Registered User
    Join Date
    01-09-2013
    Location
    Sydney, Australia
    MS-Off Ver
    2018
    Posts
    27

    Thumbs up Re: Calculating Saturday hours to correct overtime - bigger brains than mine required!

    Quote Originally Posted by JeteMc View Post
    Sorry about that. I assume that you highlighted cell Z9 to illustrate the issue with the double overtime. My comment was that if you array enter cell X9 the value displayed there will change from 40 to 62 and that the value in cell Z9 will change from 50 to 28. I have array entered both of the formulas in cells X9 and Y9 so that you can see what I mean.
    Let us know if you have any questions.
    Hey

    Just figured out how to actually do the CSE, or more importantly where the cursor needs to be...before the "="!

    All good, can't fault it all - can't thank you enough

    Have a good week

    Baiona

  10. #10
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,812

    Re: Calculating Saturday hours to correct overtime - bigger brains than mine required!

    You're Welcome and thank you for the feedback. Please take a moment to mark the thread as 'Solved' using the thread tools drop down in the ribbon above your first post. I hope that you have a blessed day.

+ 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] Calculating Overtime Hours for each Day on a 40+ Overtime per Week Basis
    By HumdrumPanic in forum Excel General
    Replies: 5
    Last Post: 09-30-2020, 12:55 PM
  2. help for formula Calculating Hours [Overtime hours]
    By tryhyper in forum Excel General
    Replies: 5
    Last Post: 07-03-2017, 04:16 AM
  3. Forecasting Overtime Hours Required to Complete a Project
    By VAred in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-11-2015, 11:04 AM
  4. Calculating overtime hours
    By Tashia in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 06-19-2014, 02:09 AM
  5. Replies: 2
    Last Post: 01-17-2014, 02:22 PM
  6. Timesheet formula for calculating ordinary hours and overtime hours.
    By zoen in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 12-18-2011, 04:23 AM
  7. calculating the number of working hours including saturday
    By drma in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-01-2010, 12:58 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