Sums with multiple conditions

johnclark

New Member
Joined
Apr 27, 2011
Messages
1
I am looking to create a spreadsheet that calculates sums with conditions ...

In Column C,I want the value to be Column A + Column B, unless it is greater than 8, then I want the sum to return 8.

In Column D, I want the value to be Column C - 8, if the value is between 0 and 4. If the value is greater than 4, then I want the sum to return 4.

In Column E, I want the value to be Column D - 12, with a maximum value of 12.

To put it into perspective, I'm creating a timesheet and I want it to calculate regular hours (max 8hrs), overtime hours (max 4hrs), and doubletime hours (max 12).
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
C2 = min(8,a2+b2)
d2 = min(4,a2+b2-c2)
e2 = min(12,a2+b2-c2-d2)
 
Upvote 0
Alternatively

C2 =MEDIAN(0,A2+B2,8)
D2 =MEDIAN(0,(A2+B2)-8,4)
E2 =MEDIAN(0,(A2+B2)-12,12)
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,518
Messages
6,179,248
Members
452,900
Latest member
LisaGo

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