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

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
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
2Name12345678910111213141516TotalHrs
3171819202122232425262728293031
4Empl 18889.59.58810.58811.58888218Reg
549.589.58810.58811.568818OT

<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>
</tbody>
2b

Worksheet Formulas
CellFormula
R4=SUM(B4:Q5)-R5
R5=SUMPRODUCT(--(B4:Q5>8),(B4:Q5-8))

<thead>
</thead><tbody>
</tbody>

<tbody>
</tbody>
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,215,053
Messages
6,122,888
Members
449,097
Latest member
dbomb1414

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