I need help creating an excel fomula

rosyposy

New Member
Joined
Jun 6, 2019
Messages
3
I created a spreadsheet years ago to track employee hours, and now we need to add overtime to it. I'm hoping I can do this and have it calculate into one cell per employee. The spreadsheet is done monthly and I have just one sheet with everyone on it and then a sheet for each employee for their stub.

On the monthly sheet, I put in the total hours daily and the all add up into one cell and then the pay is calculated. If the house are over 8 we have to pay overtime, so I am hoping that there is a formula that I can gather the over 8 hours for each day and have it total into one cell.

I hope this makes sense and someone can help me :)
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
Hi, welcome to the board.

I'm sure this is do-able but your request is far too vague for people (well me at least) to answer it definitively.

Can you describe how your data is laid out - maybe post a small sample - and describe clearly exactly what you want to do with it ?
 
Upvote 0
I created a spreadsheet years ago to track employee hours, and now we need to add overtime to it. I'm hoping I can do this and have it calculate into one cell per employee. The spreadsheet is done monthly and I have just one sheet with everyone on it and then a sheet for each employee for their stub.

On the monthly sheet, I put in the total hours daily and the all add up into one cell and then the pay is calculated. If the house are over 8 we have to pay overtime, so I am hoping that there is a formula that I can gather the over 8 hours for each day and have it total into one cell.

I hope this makes sense and someone can help me :)

This is vague, but for example if the hours for today are in cell A1, and I worked 9 hours today then A1=9. In A2(or any cell) you can put =if(A1>8, A1-8, 0) and this basically says, if A1 is more than 8 then take the value of A1(9) and subtract 8 from it. So this would return 1, as in 1 over time hour. If the amount is 8 or less it will return 0 hours because there are no overtime hours for that day. And then you can sum them all up for each day with a sum formula.
 
Last edited:
Upvote 0
This is vague, but for example if the hours for today are in cell A1, and I worked 9 hours today then A1=9. In A2(or any cell) you can put =if(A1>8, A1-8, 0) and this basically says, if A1 is more than 8 then take the value of A1(9) and subtract 8 from it. So this would return 1, as in 1 over time hour. If the amount is 8 or less it will return 0 hours because there are no overtime hours for that day. And then you can sum them all up for each day with a sum formula.

And, likewise, if you needed to report the regular hours in addition to the overtime, you could use something like [FONT=Verdana,Arial,Tahoma,Calibri,Geneva,sans-serif]=IF(A1<8,A1,8).[/FONT]
 
Upvote 0
Hi, welcome to the board.

I'm sure this is do-able but your request is far too vague for people (well me at least) to answer it definitively.

Can you describe how your data is laid out - maybe post a small sample - and describe clearly exactly what you want to do with it ?


Thank you. Here is the url https://imgur.com/a/G1HzI4B which shows a picture of my spreadsheet (I apologize, I couldn't figure out how to place it in my question).

Currently I have cells B4 to Q4 & B5 to P5 totalling up into R4.

What I would like to do is unmerge R4 & R5 and use R4 for regular hours (8 hours) and R5 for overtime hours (anything over 8 hours).

So, if it's at all possible I need a formula that would take all the hours over 8 for every day and total it up into R5.

Thank you all for your help so far. I hope this makes more sense.
 
Upvote 0
N.B. I hide some of the columns.
The formulas show the relevant ranges.
I hope that this helps

Please ensure that you specify the complete rules for calculating overtime.




Excel 2010
ABKLMNOPQRST
1Name110111213141516TotalOTReg
217262728293031
3Empl 18811.58888
4811.568823618218
5
6or245
2b
Cell Formulas
RangeFormula
R4=SUM(B3:Q4)
R6=SUM(B3:Q4)+SUMPRODUCT(--(B3:Q4>8),(B3:Q4-8))/2
S4=SUMPRODUCT(--(B3:Q4>8),(B3:Q4-8))
T4=R4-S4
 
Last edited:
Upvote 0

Excel 2010
ABCDEFGHIJKLMNOPQRS
2Name12345678910111213141516TotalHrs
3171819202122232425262728293031
4Empl 18889.59.58810.58811.58888218Reg
549.589.58810.58811.568818OT
2b
Cell Formulas
RangeFormula
R4=SUM(B4:Q5)-R5
R5=SUMPRODUCT(--(B4:Q5>8),(B4:Q5-8))
 
Last edited:
Upvote 0
Excel 2010
ABCDEFGHIJKLMNOPQRS
NameTotalHrs
Empl 1Reg
OT

<colgroup><col style="width: 25pxpx"><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
[TD="align: center"]2[/TD]

[TD="align: right"]1[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]4[/TD]
[TD="align: right"]5[/TD]
[TD="align: right"]6[/TD]
[TD="align: right"]7[/TD]
[TD="align: right"]8[/TD]
[TD="align: right"]9[/TD]
[TD="align: right"]10[/TD]
[TD="align: right"]11[/TD]
[TD="align: right"]12[/TD]
[TD="align: right"]13[/TD]
[TD="align: right"]14[/TD]
[TD="align: right"]15[/TD]
[TD="align: right"]16[/TD]

[TD="align: center"]3[/TD]
[TD="align: right"][/TD]
[TD="align: right"]17[/TD]
[TD="align: right"]18[/TD]
[TD="align: right"]19[/TD]
[TD="align: right"]20[/TD]
[TD="align: right"]21[/TD]
[TD="align: right"]22[/TD]
[TD="align: right"]23[/TD]
[TD="align: right"]24[/TD]
[TD="align: right"]25[/TD]
[TD="align: right"]26[/TD]
[TD="align: right"]27[/TD]
[TD="align: right"]28[/TD]
[TD="align: right"]29[/TD]
[TD="align: right"]30[/TD]
[TD="align: right"]31[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]4[/TD]

[TD="align: right"]8[/TD]
[TD="align: right"]8[/TD]
[TD="align: right"]8[/TD]
[TD="align: right"]9.5[/TD]
[TD="align: right"]9.5[/TD]
[TD="align: right"]8[/TD]
[TD="align: right"]8[/TD]
[TD="align: right"]10.5[/TD]
[TD="align: right"]8[/TD]
[TD="align: right"]8[/TD]
[TD="align: right"]11.5[/TD]
[TD="align: right"]8[/TD]
[TD="align: right"]8[/TD]
[TD="align: right"]8[/TD]
[TD="align: right"]8[/TD]
[TD="align: right"][/TD]
[TD="align: right"]218[/TD]

[TD="align: center"]5[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"]4[/TD]
[TD="align: right"]9.5[/TD]
[TD="align: right"]8[/TD]
[TD="align: right"]9.5[/TD]
[TD="align: right"]8[/TD]
[TD="align: right"]8[/TD]
[TD="align: right"]10.5[/TD]
[TD="align: right"]8[/TD]
[TD="align: right"]8[/TD]
[TD="align: right"]11.5[/TD]
[TD="align: right"]6[/TD]
[TD="align: right"]8[/TD]
[TD="align: right"]8[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"]18[/TD]

</tbody>
2b

[TABLE="width: 85%"]
<tbody>[TR]
[TD]Worksheet Formulas[TABLE="width: 100%"]
<thead>[TR="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]
[TH="width: 10px"]Cell[/TH]
[TH="align: left"]Formula[/TH]
[/TR]
</thead><tbody>[TR]
[TH="width: 10px, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]R4[/TH]
[TD="align: left"]=SUM(B4:Q5)-R5[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]R5[/TH]
[TD="align: left"]=SUMPRODUCT(--(B4:Q5>8),(B4:Q5-8))[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]
THANK YOU THANK YOU THANK YOU DAVE!! It works perfectly!! I am so happy that you figured this out for me.....and it's so simple. I really appreciate you taking the time to help me :)
 
Upvote 0

Forum statistics

Threads
1,224,748
Messages
6,180,721
Members
452,995
Latest member
isldboy

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top