Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Time card regular and overtime

Hi Everyone


I am trying to figure out the formula on how to calculate regular and overtime hours.


TIA!

iPhone 11 Pro Max, iOS 13

Posted on Aug 4, 2020 11:10 AM

Reply
15 replies

Aug 5, 2020 3:40 PM in response to verenis80

"Sorry but I can’t seem to get that formula to work. I keep getting errors. "


  • What is the formula (as written in your table) giving you errors?
  • What are the error messages?


Using Ian's formula for column F, I would recommend these two for columns G and H:


G2: =MIN(Regular hours per day::$A$1,F2)


H2: =MAX(0,F2-Regular hours per day::$A$1)


The image is of the last three columns of Ian's sample table. Column F values have been entered manually. The two formulas shown above are entered in G2 and H2 respectively, then filled down to Row 6.

Row 7 of the table is a Footer Row.

Row contains the formula below, entered in F7, then filled right to H7.


F7: SUM(F)


Regards,

Barry



Aug 5, 2020 8:46 AM in response to verenis80

Hi verenis80,


Jumping in here.

Cells B2:E8 are formatted as Date & Time with Date set to None.



Cells F2:H9 are formatted as Duration hr min (rather than the ambiguous 7:58 which could be a time of day).


The single-cell table "Regular hours per day" is formatted as Duration.



Formula in F2 =E2−B2−(D2−C2)


I don't know why that formula does not replace "(" and ")" with the usual crescent moons. If I delete "(" and ")" the formula throws an error. Perhaps another user can explain.


Formula in G2 =IF(F2≤Regular hours per day::$A$1,F2,Regular hours per day::$A$1)

Formula in H2 =F2−G2

Fill those formulas down.


Formula in Footer cell F9 =SUM(F)

Fill right.


Please call back with questions.

Regards,

Ian.

Aug 5, 2020 10:20 AM in response to verenis80

Hi verenis80,


The formulas will work in macOS and iOS

Sorry, I should have posted this screen shot.


"Regular hours per day" is a single-cell table formatted as Duration.

Formula in G2 =IF(F2≤Regular hours per day::$A$1,F2,Regular hours per day::$A$1)

Enter <= and Numbers will change it to ≤


Please reply if you are still having trouble.

Regards,

Ian.



Aug 5, 2020 5:50 PM in response to verenis80

Hi verenis80,


Ian's solution, and my revisions both placed the "regular hours" on a separate single cell table, which Ian named "Regular hours per day" (with a capital R).


The formulas supplied by Ian, and the formulas provided by me both got that fixed value from that table, which is why the cell reference to the cell containing that value includes the table's name,


You chose to include the 'regular hours' value in a cell on the same table as the formulas using that value,


Formulas addressing cells on their own table do not need to include the table name as part of the address of the cell(s) referenced.


Notice the differences between the display of the Table name," regular hours per day" in the formulas from your screenshot and from mine:


Yours:

Mine:


The top one shows the 'table name' in plain type because your document does not include a tale with that name.

(Even if it did have a table named "Regular hours per day", I suspect your displayed formula would show the same format due ti the lower case r not matching the actual text of the table name).


Delete this text, and the two colons, from your formula, and report any changes.


IF there are still error triangles, please supply the formula in the cell containing the error AND the error message for that cell.


Regards,

Barry





Aug 8, 2020 12:02 AM in response to Yellowbox

Hi Ian,



The 'crescent moon' and it's partner, the scooped out right end of a function name are always the opening and closing parentheses of a function. The 'plain' parentheses in this formula (which contains no functions) are signals to direct the Order of Operations in the expression to ensure that the D2-C2 subtraction is done before subtracting the result from the result of E2-B2.


10-2-5-3 = 0

10-2-(5-3)=6


A handy mnemonic for the basic Order of Operations is this one that I've used in elementary school classrooms:

Bless My Dear Aunt Sally!


meaning : Brackets, Multiplication and Division, Addition and Subtraction.

Details: within each level of brackets (parentheses), do all the multiplication and division, then do all the addition and subtraction.


Regards,

Barry




Aug 5, 2020 12:40 AM in response to verenis80

"the formula" depends on what constitutes "overtime hours" in your location.


Are they time in excess of a specific daily limit? If so, what is that limit?


Are they time in excess of a specifis weekly limit? If so, what is that limit?


Essentially, your formula is going to be the same as the one you'd use to do the calculations using pencil and paper.


Regards,

Barry

Time card regular and overtime

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.