confusing sums

amreeves87

New Member
Joined
Apr 4, 2020
Messages
12
Office Version
  1. 2016
Platform
  1. Windows
Hi all.

not sure how to explain this properly

NameRateWeekday Overtime RateWeekend Overtime RateMondayTuesdayWednesdayThursdayFridaySaturdaySundayTotal Cost
J Smith
£40​
£60​
£80​
10​
10​
10​
10​
10​
10​
10​

I am trying to figure out the total cost of an employee per week based on hours worked per day.
if the first 7.24 hours of a weekday are standard.
above that is x1.5, weekend is all x2.

I do not even know where to start.

sumif(the first 7.24 of mondays 10 x £40, anything above the 7.24 x £60) + (the same on tues, weds,thurs,fri) + (sat hours x £80) + (sun x £80)

needs to be able to work if the hours are more of less.

is this possible?

many thanks
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
Perhaps:

Book2
ABCDEFGHIJKL
1NameRateWeekday Overtime RateWeekend Overtime RateMondayTuesdayWednesdayThursdayFridaySaturdaySundayTotal Cost
2J Smith £ 40.00 £ 60.00 £ 80.00 10101010101010 £3,876.00
Sheet1
Cell Formulas
RangeFormula
L2L2=(SUM(IF(E2:I2>7.24,7.24,E2:I2))*B2)+SUM(IF(E2:I2>7.24,(E2:I2-7.24)*C2,0))+(SUM(J2:K2)*D2)
Press CTRL+SHIFT+ENTER to enter array formulas surrounded with curly braces.
 
Upvote 0
In your example how much would be for Monday?

sumif(the first 7.24 of mondays 10 x £40, anything above the 7.24 x £60) + (the same on tues, weds,thurs,fri) + (sat hours x £80) + (sun x £80)

I am a bit confused.
In the above quote you have written Mondays 10 * 40, however, as per the remaining explanation only 7.24 would be multiplied by 40.

Could you tell us what would be the correct output for Monday in figures? and please show us how you derived at the results.
 
Upvote 0
I agree, the spec is ambiguous, though here is my initial reading's take on what the answer is presuming the rates are hourly:
Book2
ABCDEFGHIJKL
1NameRateWeekday Overtime RateWeekend Overtime RateMondayTuesdayWednesdayThursdayFridaySaturdaySundayTotal Cost
2J Smith£40£60£8010101010101010£16,908.00
Sheet1
Cell Formulas
RangeFormula
L2L2=IF(E2>=7.24,(7.24*E2*B2),E2*B2)+IF(E2>7.24,((E2-7.24)*C2),0)+ IF(F2>=7.24,(7.24*F2*B2),F2*B2)+IF(F2>7.24,((F2-7.24)*C2),0)+ IF(G2>=7.24,(7.24*G2*B2),G2*B2)+IF(G2>7.24,((G2-7.24)*C2),0)+ IF(H2>=7.24,(7.24*H2*B2),H2*B2)+IF(H2>7.24,((H2-7.24)*C2),0)+ IF(I2>=7.24,(7.24*I2*B2),I2*B2)+IF(I2>7.24,((I2-7.24)*C2),0)+ (J2*D2)+(K2*D2)
 
Upvote 0
In your example how much would be for Monday?



I am a bit confused.
In the above quote you have written Mondays 10 * 40, however, as per the remaining explanation only 7.24 would be multiplied by 40.

Could you tell us what would be the correct output for Monday in figures? and please show us how you derived at the results.
so if monday would be 10 hours. the first 7.24 hours would be charged at £40, the remaining 2.76 would be charged at £60 as that's classed as overtime.
same for all weekdays.
weekends would be all hours at £80.

i have manually worked it all out and it seems that the first response has worked for me = £3876
 
Upvote 0
Perhaps:

Book2
ABCDEFGHIJKL
1NameRateWeekday Overtime RateWeekend Overtime RateMondayTuesdayWednesdayThursdayFridaySaturdaySundayTotal Cost
2J Smith £ 40.00 £ 60.00 £ 80.00 10101010101010 £3,876.00
Sheet1
Cell Formulas
RangeFormula
L2L2=(SUM(IF(E2:I2>7.24,7.24,E2:I2))*B2)+SUM(IF(E2:I2>7.24,(E2:I2-7.24)*C2,0))+(SUM(J2:K2)*D2)
Press CTRL+SHIFT+ENTER to enter array formulas surrounded with curly braces.
that worked and its great. thank you
 
Upvote 0
What if the number of hours is less than 7.24? or this scenario never occurs?
 
Upvote 0
What if the number of hours is less than 7.24? or this scenario never occurs?
Scott's answer covers that.
if a 0 is in place it returns a 0
if 1 is put in it returns 40
if 8 is put it in returns (7.24 x 40) + (0.76 x 60)

all works great.
 
Upvote 0
without an array formula,
=SUM(E2:I2)*B2+(SUMIF(E2:I2,">="&7.24)-COUNTIF(E2:I2,">="&7.24)*7.24)*(C2-B2)+SUM(J2:K2)*D2
 
Upvote 0

Forum statistics

Threads
1,214,947
Messages
6,122,413
Members
449,082
Latest member
tish101

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