Employee's Workhours and Overtime Pay

famieshafie

New Member
Joined
Dec 25, 2008
Messages
18
I am preparing a worksheet that will calculate a worker's normal working hours and overtime working hours.

The value in A1 minus B1 will show result in C1 and D1

If the result form A1 minus B1 exceeds 8, the value 8 will go show in C1 and the remaining value shows up in D1.

For example: 12 is the result of A1 minus B1. So, C1 will display the number 8 and 4 will display in D1.

How can I do that...?
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
Dear Paul,

I am new to excel and googling does help when it directed me to MrExcel. That you for the link you gave me, I'll try my best to read thru the content till I find the answer... and I hope it will be soon, my boss is pushing.

Thank you.;)
 
Upvote 0
Hi, this could works for your request: in C1 =IF(B1-A1>8,8,B1-A1), In D1: =IF(B1-A1>8,B1-A1-8,"") Now only copy down up to row you need. I hope this helps. Best regards
 
Upvote 0
Hi, this could works for your request: in C1 =IF(B1-A1>8,8,B1-A1), In D1: =IF(B1-A1>8,B1-A1-8,"") Now only copy down up to row you need. I hope this helps. Best regards
Hey Cesar,

It gave me result in both C & D as what I needed... I will do the adjustment from there.. I would like to thank you for your kind assistance.
 
Upvote 0
Your welcome Famie, I^ve realized of one thing; replace "B1-A1" and put in its place "A1-B1" in all occurences in both formulas. Or use absolute value formula within IF formula to get always a positive result. E.g. "IF(ABS(B1-A1),...). Best regards :)
 
Upvote 0

Forum statistics

Threads
1,221,310
Messages
6,159,176
Members
451,543
Latest member
cesymcox

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