Complicated Formula? Maximums

Lmaonade

Board Regular
Joined
Jan 5, 2018
Messages
52
Hi,

I'm trying to create a tool to work out commissions using a certain set of rules and tiers. I've attached a screenshot of my spreadsheet.

1631714705222.png


So basically I've been having trouble trying to work out the formulas to put in these cells: S12, S13, S19, S20.

The way I want it to work is. The maximum in those cells can only be what's in the From and To cells next to them. so in cell S12 the maximum this can be is £37,000. BUT as there has already been £25,000 in the previous month, this can only be £12,000 maximum now. (Basically the maximum amount in the Billing column can only be whatever the number is in the W column). The numbers in L4, L5 and L6 give the information. So in Month 1. £25,000 was made. Tier 1 is 0 to 12,000 so 12,000 goes straight into here with the other 13,000 going into tier 2. Month 1 is easy for me to create formulas for. But now Month 2 has £33,000 more. so I need formulas to put £12,000 of this into S12 and the other £21,000 into S13. But I also need S13 to be set up to only take £25,000 maximum and anything else I will set to be put into Tier 4.

Then for Month 3, £50,000 was made. I would need to do the same but this time S18 (Tier1) would be 0 (As £12,000 is already put in Month 1), S19 (Tier 2) would also be 0 (As £13,000 is in Month 1 and £12,000 in month 2) and then S20 (Tier 3) would need to get £4,000 put into it from this £50,000 and the rest I'll put into Tier 4.

If anyone can help me with the formulas I would need to use for S12, S13, S19, S20 I'd be massively appreciative. This forum is always so helpful and I thank anyone that can help in advance. If you need more info please let me know.

Thanks,
Andy
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
An image is not very helpful.
You can post an extract of your sheet with the forum's tool XL2BB.
You can calculate the commission on the cumulative sales see below.
You can paste the post into a clean sheet. Click on the icon below the f(x) and then move to your sheet and paste.
see YouTube magic trick 673

Commission2020.xlsm
ABCDEF
1Bracket/HurdleRateRate Differential
205%5%
312,00010%5%
437,00020%10%
562,00025%5%
6
7JanFebMarAprMay
8Input amounts: Sales25,000.0033,000.0030,000.00
9
10Commission1,900.005,400.007,300.000.000.00
11
12Total88,000.0014,600.00
3a
Cell Formulas
RangeFormula
C2:C5C2=B2-N(B1)
B10:F10B10=SUMPRODUCT(--(SUM($B$8:B8)>rB),SUM($B$8:B8)-rB,rDiff)-SUM($A$10:A10)
B12B12=SUM(B8:H8)
C12C12=SUMPRODUCT(--(B12>rB),B12-rB,rDiff)
Named Ranges
NameRefers ToCells
'3a'!rB='3a'!$A$2:$A$5C12, B10:F10
'3a'!rDiff='3a'!$C$2:$C$5C12, B10:F10
 
Upvote 0
I added the arithmetic D2:D5 and the total calculation now shows the values for the brackets and rate differentials.

Commission2020.xlsm
ABCDE
1Bracket/HurdleRateRate DifferentialArithmetic
205%5%600.00
312,00010%5%2,500.00
437,00020%10%5,000.00
562,00025%5%6,500.00
614,600.00
7JanFebMarApr
8Input amounts: Sales25,000.0033,000.0030,000.00
9
10Commission1,900.005,400.007,300.000.00
11
12Total88,000.0014,600.00
3a
Cell Formulas
RangeFormula
C2:C5C2=B2-N(B1)
D2:D5D2=MAX(0,MIN($B$12,A3)-A2)*B2
D6D6=SUM(D2:D5)
B10:E10B10=SUMPRODUCT(--(SUM($B$8:B8)>rB),SUM($B$8:B8)-rB,rDiff)-SUM($A$10:A10)
B12B12=SUM(B8:H8)
C12C12=SUMPRODUCT(--(B12>{0;12000;37000;62000}),B12-{0;12000;37000;62000},{0.05;0.05;0.1;0.05})
Named Ranges
NameRefers ToCells
'3a'!rB='3a'!$A$2:$A$5B10:E10, D2
'3a'!rDiff='3a'!$C$2:$C$5B10:E10
 
Upvote 0
You can complete the calculations without the Table of Brackets and Rates.
I named the array information for Brackets and Rate Differential in Name Manager.
aB = {0;12000;37000;62000} and aR ={0.05;0.05;0.1;0.05}

Commission2020.xlsm
KLMN
1
2 %
3Month 125,000.001,900.007.60%
4Month 233,000.005,400.0016.36%
5Month 350,000.0012,300.0024.60%
6Quarter108,000.0019,600.0018.15%
3aa
Cell Formulas
RangeFormula
M3:M5M3=SUMPRODUCT(--(SUM($L$3:L3)>aB),SUM($L$3:L3)-aB,aR)-SUM($M$2:M2)
N3:N6N3=M3/L3
L6:M6L6=SUM(L3:L5)
 
Upvote 0

Forum statistics

Threads
1,214,788
Messages
6,121,597
Members
449,038
Latest member
Arbind kumar

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