hopefully this link should work!
https://dl.dropboxusercontent.com/u/35590039/Test%20Data%20for%20Tiered%20Commission.xlsx
Perfect! Some questions....
each of those bands has a tiered commission rate e.g. Band1, First 0-10K = 1.95%, then from 10k to 20K = .8%, then all the rest is .5%.
But I find the following in the Bands worksheet, for example:
[TABLE="class: grid, width: 162"]
<tbody>[TR]
[TD][/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]B[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]
Band 1[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD="align: right"] 10,000.00[/TD]
[TD="align: right"]1.95%[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD="align: right"] 20,000.00[/TD]
[TD="align: right"]0.8%[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD="align: right"] 100,000.00[/TD]
[TD="align: right"]0.5%[/TD]
[/TR]
</tbody>[/TABLE]
It seems that column A is the upperbound of the tier. But you wrote that the rate for "all the rest" over 20,000.00 is 0.5%.
So why do you have 100,000.00? Is there really an upperbound for the 3rd tier? Or is that just a mistake?
I assume the latter for now.
In Bands!A19, you wrote:
All bands have a minimum commission rate [sic] of £25
One interpretation is: if the computed commission is less than 25.00, award a commission of 25.00. But that would seem odd to me; for example, it seems odd that you would award a commission of 25.00 on sales of 25.00.
Instead, I assume you mean: if the calculated commission is less than 25.00, no commission is awarded. For Band 1, that means no commission is awarded on amounts under 1282.06 (25 / 1.95% rounded up). We can incorporate that into the tables below.
For the solution below, I suggest that you construct tables with the
lowerbound in column A, not the upperbound, in the Bands worksheet.
[TABLE="class: grid, width: 300"]
<tbody>[TR]
[TD][/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]B[/TD]
[TD="align: center"]C[/TD]
[TD="align: center"]D[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]
Band 1[/TD]
[TD][/TD]
[TD="align: right"]Rate[/TD]
[TD="align: right"]Diff_Rate[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD="align: right"] 1,282.05[/TD]
[TD="align: right"]0.00[/TD]
[TD="align: right"]1.95%[/TD]
[TD="align: right"]1.95%[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD="align: right"] 10,000.00[/TD]
[TD="align: right"]10,000.00[/TD]
[TD="align: right"]0.80%[/TD]
[TD="align: right"]-1.15%[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD="align: right"] 20,000.00[/TD]
[TD="align: right"]20,000.00[/TD]
[TD="align: right"]0.50%[/TD]
[TD="align: right"]-0.30%[/TD]
[/TR]
</tbody>[/TABLE]
[TABLE="class: grid, width: 300"]
<tbody>[TR]
[TD][/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]B[/TD]
[TD="align: center"]C[/TD]
[TD="align: center"]D[/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD]
Band 2[/TD]
[TD][/TD]
[TD="align: right"]Rate[/TD]
[TD="align: right"]Diff_Rate[/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD="align: right"] 2,499.99[/TD]
[TD="align: right"]0.00[/TD]
[TD="align: right"]1.00%[/TD]
[TD="align: right"]1.00%[/TD]
[/TR]
[TR]
[TD]9[/TD]
[TD="align: right"] 10,000.00[/TD]
[TD="align: right"]10,000.00[/TD]
[TD="align: right"]0.50%[/TD]
[TD="align: right"]-0.50%[/TD]
[/TR]
</tbody>[/TABLE]
[TABLE="class: grid, width: 300"]
<tbody>[TR]
[TD][/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]B[/TD]
[TD="align: center"]C[/TD]
[TD="align: center"]D[/TD]
[/TR]
[TR]
[TD]13[/TD]
[TD]
Band 3[/TD]
[TD][/TD]
[TD="align: right"]Rate[/TD]
[TD="align: right"]Diff_Rate[/TD]
[/TR]
[TR]
[TD]14[/TD]
[TD="align: right"] 1,428.57[/TD]
[TD="align: right"]0.00[/TD]
[TD="align: right"]1.75%[/TD]
[TD="align: right"]1.75%[/TD]
[/TR]
[TR]
[TD]15[/TD]
[TD="align: right"] 10,000.00[/TD]
[TD="align: right"]10,000.00[/TD]
[TD="align: right"]1.00%[/TD]
[TD="align: right"]-0.75%[/TD]
[/TR]
[TR]
[TD]16[/TD]
[TD="align: right"] 20,000.00[/TD]
[TD="align: right"]20,000.00[/TD]
[TD="align: right"]0.50%[/TD]
[TD="align: right"]-0.50%[/TD]
[/TR]
</tbody>[/TABLE]
The formulas are:
A2: =ROUNDUP(25/C2,2)-0.01
A8: =ROUNDUP(25/C8,2)-0.01
A14: =ROUNDUP(25/C14,2)-0.01
B3: =A3
B4: =A4
B9: =A9
B15: =A15
B16: =A16
D2: =C2
D3: =C3-C2
D4: =C4-C3
D8: =C8
D9: =C9-C8
D14: =C14
D15: =C15-C14
D16: =C16-C15
Then the commission formula in Data!E2, for example, is:
Code:
=ROUND(CHOOSE(MATCH(C2,{"Band 1","Band 2","Band 3"},0),
SUMPRODUCT(--(D2>Bands!$A$2:$A$4),D2-Bands!$B$2:$B$4,Bands!$D$2:$D$4),
SUMPRODUCT(--(D2>Bands!$A$8:$A$9),D2-Bands!$B$8:$B$9,Bands!$D$8:$D$9),
SUMPRODUCT(--(D2>Bands!$A$14:$A$16),D2-Bands!$B$14:$B$16,Bands!$D$14:$D$16)),2)
MATCH returns the index 1, 2 or 3, which selects the 1st, 2nd or 3rd SUMPRODUCT expression.
Although the use of CHOOSE might look complicated, it might be the most efficient implementation because Excel calculates only the applicable SUMPRODUCT expression based on the MATCH result, not all of them.
But if you actually have a lot more bands, we might consider a very different implementation. Let me know.
For an explanation of the SUMPRODUCT expressions, see http://www.mcgimpsey.com/excel/variablerate.html.
But note the differences in the tables above. Column A is the lowerbound for the amount that earns commission. Column B is the lowerbound for the commission calculation. They differ only in the first row of each table.