Match customer and calculate commission basis their respective slabs

Status
Not open for further replies.

amandeep08

Board Regular
Joined
Mar 20, 2011
Messages
130
Office Version
  1. 365
Hi All,

I have more than 100 customers, their sales data and their slabs. I want to Match customer and calculate commission basis their respective slabs. Pl help providing formula. I am using office 365.

Slab Calc.xlsx
ABCDEFGH
1Required Field
2Customer NameSalesProspective CommissionCustomer Name Start Slab End Slab Commission
3A1,00,0003,400A-10,0002.00%
4S2,00,00014,750A10,00150,0003.00%
5A50,0011,25,0004.00%
6A1,25,0015.00%
7S-50,0006.00%
8S50,0011,00,0007.00%
9S1,00,0011,75,0008.00%
10S1,75,0019.00%
Sheet1
Cell Formulas
RangeFormula
C3C3=((G3-F3)*H3)+((G4-F4)*H4)+((B3-F5)*H5)
C4C4=((G7-F7)*H7)+((G8-F8)*H8)+((G9-F9)*H9)+((B4-F10+1)*H10)
 
Last edited:

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
The issue I see with marginal rate tables like this is that the end slab quantity does not match the next start slab quantity. Typically these tables are set up to show a difference of 1 to help clarify the boundary, but this leaves "1" completely unaccounted for between each slab. In the example below, I've treated the start slab as though it has the same values as the end slab, except starting at 0. For example, for Customer A, the start slab is {0; 10000; 50000; 125,000}, and the condition applied to the start slab is that a Sales quantity must be greater than the slab/tier lower boundary (not greater than or equal to). This approach doesn't leave the 1's unaccounted for between slabs. Consequently, the results are slightly different from your original post. Another way to think about this is to consider what the commission would be for Customer A if the Sales were 10,000.9. Would it be 10000 * 0.02=200.00 or 10000 * 0.02 + 0.9 * 0.03 = 200.027?

This formula assigns the entire slab data table to a variable called "slab", and then it is filtered to extract the relevant portion for the specified customer...and this portion of the slab array is called "cslab" (short for customer slab). Then the start slab is reestablished based on the point made above, by using the end slab values, except a 0 is used for the starting point....this revised start slab is called "csslab" (short for customer start slab). The commission for the customer is given a convenient variable name, "ccom". Next, the formula approach taken for the final calculation of commission relies on a differential rate between slabs/tiers. So the index of the commission rate array (ccom) is effectively shifted by one so that the difference can be taken between successive slabs. This shifting operation is performed by the formula assigned to the "ccom_shft" variable (short for customer commission shifted). The final calculation is performed by SUMPRODUCT.
MrExcel_20240301.xlsx
ABCDEFGH
1
2Customer NameSalesProspective CommissionCustomer Name Start Slab End Slab Commission
3A1000003400.00A0100000.02
4S20000014750.00A10001500000.03
5A500011250000.04
6A1250010.05
7S0500000.06
8S500011000000.07
9S1000011750000.08
10S1750010.09
Sheet6
Cell Formulas
RangeFormula
C3:C4C3=LET(slab,$E$3:$H$10,cslab,FILTER(slab,CHOOSECOLS(slab,1)=A3),csslab,VSTACK(0,DROP(CHOOSECOLS(cslab,3),-1)),ccom,CHOOSECOLS(cslab,4),ccom_shft,VSTACK(0,DROP(ccom,-1)),SUMPRODUCT(--(B3>csslab),(B3-csslab),(ccom-ccom_shft)))
 
Upvote 0
Status
Not open for further replies.

Forum statistics

Threads
1,215,127
Messages
6,123,203
Members
449,090
Latest member
bes000

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