Help with Tier calculations

Jdogg2022

New Member
Joined
Mar 21, 2022
Messages
22
Office Version
  1. 365
Platform
  1. Windows
Hi All,
I am trying to calculate when something has gone on detention.. as an example for my below table.. Days 1-7 woulod be free.. but then it goes into the next tier (8-14) which is when charges start incurring.. however it can only go to the maximum amount of days in that tier (which in this case is 7 days) before it goes to the next tier.. but keeping in mind that it is 7 days inclusive.. so once you hit 8 days of detention it should be 7 days detentention in the 8-14 catergory, and then 1 day in the 15-21 tier.

I will mention that the day to/from field has a vlookup running off it so it will change (these are already set up)
The grey box is where you would enter the amount of days detention has currently incurred.
The red cells are basically some formulars which I started to work on.

Will need some help on this please.

DAY FROMDAY TONumber of Days IncurredCost Incurred
8148 - 14 days6$480.00
152115 - 21 days8$880.00
2299922 days +0$0.00
Total
Number of days on Detention6$1,360.00
 
You're welcome, thanks for the feedback.
 
Upvote 0

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
Why do you want the calculation for each bracket?
The following assumes that the first bracket will always have a rate of 0 and the number on detention does not include the first 7 days.
You want the input to be later in the spreadsheet than the calculations.
If the rates are constant, you can name the rate differentials. I named the rate differentials aR value ={80;30;30}

Commission2022.xlsm
OPQRSTU
1Shipping LineCMA
2Container TypeGP
3Container Size20 --- Arithmetic ---
4DAY FROMDAY TOPer Day AmountNumber of Days IncurredCost IncurredBy BracketCumulative
5
6080560.00560.00
77110770.001,330.00
8141407,140.008,470.00
91E+308
10
11Total
12Number of days on Detention65$8,470.00$8,470.00
13if rates are constant$8,470.00$8,470.00
14
15
3a
Cell Formulas
RangeFormula
T6:T8T6=MAX(0,MIN($R$12,O7)-O6)*Q6
U6U6=MAX(0,MIN($R$12,O7)-O6)*Q6+N(U4)
U7:U8U7=MAX(0,MIN($R$12,O8)-O7)*Q7+N(U6)
O9O9=BigNum
S12S12=SUMPRODUCT(--(R12>O6:O8),R12-O6:O8,Q6:Q8-Q5:Q7)
T12T12=SUM(IF(R12>O6:O8,(R12-O6:O8)*(Q6:Q8-Q5:Q7)))
S13S13=SUMPRODUCT(--(R12>O6:O8),R12-O6:O8,aR)
T13T13=SUM(IF(R12>O6:O8,(R12-O6:O8)*(Q6:Q8-Q5:Q7)))
 
Upvote 0

Forum statistics

Threads
1,215,467
Messages
6,124,984
Members
449,201
Latest member
Lunzwe73

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