Calculate difference with upper limit

cdfal

New Member
Joined
Apr 12, 2016
Messages
3
Hi everybody. Hoping someone could give me some help with the below query.

I need to find out how many hours workers are doing above their contract. These fall into two pay rates. Any hours done up to 37.5 is paid at one rate (Extra Time), and any hours over 37.5 (Over Time) is paid at another rate. I need to automatically split these hours into which pay band they fall.

For example, with a working formula, the two records below would display:
Record 1 - Over Time = 4.5 and Extra Time = 0.
Record 2 - Over Time = 22.5 and Extra Time = 17.5

The fields Contract, Over Time, and Extra Time should then be the same as Total Hours. I just need to split it.

Could someone help? Can it be done automatically?



12998749_10153901458445860_4572408062961888057_n.jpg
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
I know at some point you'll need to calculate what the threshold to take them from 'Extra Time' to 'Over Time' is (=37.5-Contact), but I'm not sure at what point this needs to go in.

Then, Extra Time's upper limit would be this threshold, with any additional hours then going into the Over Time column.
 
Upvote 0
Hi,

Using two formulas keeps it simple:


Excel 2010
ABCDE
1NameContractOver TimeExtra TimeTotal Hours
2Joe37.504.500.0042.00
3Jack20.0022.5017.5060.00
Sheet1
Cell Formulas
RangeFormula
C2=E2-37.5
D2=37.5-B2

Formulas copied down.
 
Upvote 0
Hi - thanks for the quick reply. Not quite what I'm looking for.

Essentially, Extra Time will equal Total Hours - Contact, BUT only up to 37.5 when the Contract is added.

The remainder (hours over 37.5) would then go into Over Time.
 
Upvote 0
Well, that's exactly what my sample (according to your OP), and your description, is doing.

May be you need to provide another sample with various scenarios.
 
Upvote 0
Since you're not providing more data to show what you need, I've created the following, adding a couple of scenarios, see if it suits your needs:


Excel 2010
ABCDE
1NameContractOver TimeExtra TimeTotal Hours
2Joe37.504.500.0042.00
3Jack20.0022.5017.5060.00
4Jane40.0020.000.0060.00
5Bob20.000.0015.0035.00
Sheet1
Cell Formulas
RangeFormula
C2=IF(E2<37.5,0,MIN(E2-37.5,E2-B2))
D2=IF(B2<37.5,MIN(37.5-B2,E2-B2),0)


Formulas copied down.
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,284
Members
452,630
Latest member
OdubiYouth

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