Tranched Quantities Logic Problem

sdm100

New Member
Joined
Jun 15, 2013
Messages
14
Office Version
  1. 365
Platform
  1. Windows
Hello,

I have been going crazy trying to work out the logic for this problem!

I am creating a spreadsheet showing 12 months of the year and the payment associated with a quantity of goods. We don't know the quantity of goods delivered yet, so the spreadsheet has to calculate when we know the numbers.

The first 0 to 35,000 units delivered cost £10 per unit, therefore this tranche will max out at a payment of 35,000 * 10 (£350,000) for the year and we typically manage to delivery 35,000 unit within the first few months of the year.

This element is straightforward, I am probably not using the most efficient formula, but it works (see below)

=IF(SUM(C4:D4)>$D$13,($D$13*$B$6)-C6,IF(D4<=$D$13,D4*$B$6,$B$6*$D$13))

The element I am really struggling on is the next tranche of pricing which is >35,000 and <=100,000 and this is priced at £5. So the spreadsheet needs to workout when year to date we have delivered more than 35,000 and price the next tranche of 65,000 units at £5 and cap this calculation at a year to date of 100,000 cumulative units.

Then all volumes year to date above 100,000 is priced at £4, with is a simpler formula that I can probably work out.

For the avoidance of doubt, each tranche must be fully completed before the next one prices, i.e. if we deliver 10,000 units in January, then the Jan invoice is 10,000 * 10 and if by April we have sold year to date 35,001, then we would have invoiced 35,000 units at £10 and one unit at £5 and then each subsequent unit will be priced at £5 up to 100,000 cumulative units year to date (65,000 in total) would price at £5, before any excess units above 100,000 price at £4. Hope that makes sense!

I hope you can see from the screen shot that the green line works and has stopped invoicing from within month 7 as the cumulative bill for 35,000 units is hit, so on that invoicing line, it is showing zeros for the end of the year.

Thanks in advance!
Sdm
 

Attachments

  • Screenshot 2022-03-16 at 00.15.21.png
    Screenshot 2022-03-16 at 00.15.21.png
    61.3 KB · Views: 9

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
There are several ways to do this, depending on how much detail you want to see. This approach shows the apportionment of the quantities among the different rate tiers and then computes the total of invoices for each month. This requires a blank column B that is involved in setting up the sum range for prior months...this column can be hidden from view.
MrExcel_20220315.xlsx
ABCDEFGHIJKLMNOP
1Blank Column
2Month123456789101112Total
3Quantity5000560025000400001500080004000200050001100050005000130600
4Cost\Allocations
510500056002440000000000035000
65  6004000015000800014000000065000
74      260020005000110005000500030600
8Total Cost5000056000247000200000750004000017400800020000440002000020000
Sheet1
Cell Formulas
RangeFormula
P3,P5:P7P3=SUM(C3:N3)
C5:N5C5=IF(SUM($B5:B5)<=35000,MIN(C$3,35000-SUM($B5:B5)),"")
C6:N6C6=IF((SUM($B5:C5,$B6:B6)>=35000)*(SUM($B5:C5,$B6:B6)<=100000),MIN(C$3-SUM(C$5:C5),100000-SUM($B5:C5,$B6:B6)),"")
C7:N7C7=IF(SUM($B5:C5,$B6:C6,$B7:B7)>=100000,C$3-SUM(C$5:C6),"")
C8:N8C8=SUMPRODUCT(C5:C7,$A$5:$A$7)
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,289
Members
452,631
Latest member
a_potato

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