value calculation

pyclen

Board Regular
Joined
Jan 17, 2022
Messages
85
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
Hi All,

I have a calculation that I would like to automate.
I need to calculate cost to make something however that cost depends on time needed. Also, the cost per hour is reduced when a 3rd or more shifts are needed (up to 10, if more than 10 I need to calculate by hand anyway).
Is there a way to calculate the cost using two different hourly rates depending on the length of time needed?

Any help is greatly appreciated

value calculation.xlsx
BCDEFG
3length of shift (h)8
4
51st, 2nd shift3rd - 10th shift
6Cost per shift ($)1000750
7
8
91st example2nd example
10items per hour100100
11items to be made10003000
12time needed1030
13
14total cost200040003500
15'wrong calculation'correct calculation
Sheet1
Cell Formulas
RangeFormula
D12,F12D12=IF(OR(D10="",D11=""),"",D11/D10)
D14,F14D14=IF(D12="",0,CEILING(D12,8)/8*1000)
G14G14=2*(D6+E6)
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
@pyclen Maybe like below?
Book1
CDEF
3length of shift (h)8
4
51st, 2nd shift3rd - 10th shift
6Cost per shift ($)1000750
7
8
91st example2nd example
10items per hour100100
11items to be made10003000
12time needed1030
13
14total cost20003500
Sheet1
Cell Formulas
RangeFormula
D12,F12D12=IF(OR(D10="",D11=""),"",D11/D10)
D14,F14D14=IF(D12="",0,LET(FT,ROUNDUP(D12/$D$3,),(MIN(FT,2)*$D$6)+(FT-2)*$E$6))
 
Upvote 0
Solution
@pyclen Maybe like below?
Book1
CDEF
3length of shift (h)8
4
51st, 2nd shift3rd - 10th shift
6Cost per shift ($)1000750
7
8
91st example2nd example
10items per hour100100
11items to be made10003000
12time needed1030
13
14total cost20003500
Sheet1
Cell Formulas
RangeFormula
D12,F12D12=IF(OR(D10="",D11=""),"",D11/D10)
D14,F14D14=IF(D12="",0,LET(FT,ROUNDUP(D12/$D$3,),(MIN(FT,2)*$D$6)+(FT-2)*$E$6))
Excellent, that will work
thank you very much for the help

This board really is so very helpful and I as a somewhat novice (I know enough to damage :) ) can learn so much from reading all the posts and answers
 
Upvote 0
@pyclen Just realised that the above formula fails to give the correct result for a single shift!!

Please revise to be
Excel Formula:
 =IF(D12="",0,LET(FT,ROUNDUP(D12/$D$3,),(MIN(FT,2)*$D$6)+(MAX(0,FT-2))*$E$6))
 
Upvote 0
Thank you so much for letting me know.
I really appreciate you going back and coming up with a corrected version.
Enjoy your weekend
 
Upvote 0

Forum statistics

Threads
1,215,390
Messages
6,124,669
Members
449,178
Latest member
Emilou

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