Lookup multiple customers and apply their respective slabs

amandeep08

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

I have 100+ customers and each one is having different commission slabs. I want the formula which will match the customer name and apply the respective slabs on the sales done by them.

I have tried multiple formulas but not able to get success. Apart from this, i have tried putting the slabs in a cell without equal sign and tried to ccalculate the same basis the lookup value but it also not worked. Pl help me
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
what is a slab?

Please post a sample of your data, and expected results?
What version of excel do you use? Please update your profile so the forum can give you an answer that fits your excel version.
 
Upvote 0
what is a slab?

Please post a sample of your data, and expected results?
What version of excel do you use? Please update your profile so the forum can give you an answer that fits your excel version.
Hi,
I am using Office 365. I have uploaded the data with example. Pl help if possible.

Book1
ABCDEFGHIJ
1Required DataSlab Master
2Customer NameSalesCommission (%)Customer NameStart SlabEnd SlabMargin
3A1,00,00,0008%A-30,00,0005%
4B2,00,00,0007%A30,00,00160,00,0006%
5C3,00,00,0001%A60,00,00190,00,0007%
6A90,00,0018%
7B-70,00,0003%
8B70,00,0011,00,00,0005%
9B1,00,00,0013,00,00,0007%
10B3,00,00,0019%
11C-5,00,00,0001%
12C5,00,00,00110,00,00,0002%
13C10,00,00,00120,00,00,0003%
14C20,00,00,0014%
Customer Data
 
Upvote 0
try this:

Book4
ABCDEFGHIJ
1Required DataSlab Master
2Customer NameSalesCommission (%)Customer NameStart SlabEnd SlabMargin
3A10,000,0000.080.08A03,000,0000.05
4B20,000,0000.070.07A3,000,0016,000,0000.06
5C30,000,0000.010.01A6,000,0019,000,0000.07
6A9,000,0010.08
7B07,000,0000.03
8B7,000,00110,000,0000.05
9B10,000,00130,000,0000.07
10B30,000,0010.09
11C050,000,0000.01
12C50,000,001100,000,0000.02
13C100,000,001200,000,0000.03
14C200,000,0010.04
Sheet3
Cell Formulas
RangeFormula
D3:D5D3=LET(CN,A3,CS,B3,Cnames,$G$3:$G$14,Start,$H$3:$H$14,End,IF($I$3:$I$14="",2^1000,$I$3:$I$14),Margin,$J$3:$J$14, FILTER(Margin,(CN=Cnames)*(CS>=Start)*(CS<=End),""))
 
Upvote 0
try this:
Thanks. This is working fine. I also have slabs which are prospective in nature. Can you help here as well:

what is a slab?

Please post a sample of your data, and expected results?
What version of excel do you use? Please update your profile so the forum can give you an answer that fits your excel version.

Thanks. This is working fine. I also have slabs which are prospective in nature. Can you help here as well:
 
Upvote 0
Book2
ABCDEFGHI
1Prospective Slab Required
2Customer NameSalesAmountCustomer NameStart SlabEnd SlabMargin
3A1,00,0003,400A-10,0002%
4B2,00,00016,400A10,00150,0003%
5A50,0011,00,0004%
6A1,00,0015%
7B-10,0006%
8B10,00150,0007%
9B50,0011,00,0008%
10B1,00,0019%
Sheet1
Cell Formulas
RangeFormula
C3C3=((H3-G3)*I3)+((H4-G4+1)*I4)+((H5-G5+1)*I5)
C4C4=((H7-G7)*I7)+((H8-G8+1)*I8)+((H9-G9+1)*I9)+((B4-G10+1)*I10)
 
Upvote 0
Do you you require the blended rate or the commission amount?
 
Upvote 0

You can build your own factor for each set of common brackets and rates.
I will post the information for the calculation relevant for B.
The function prompts for the required input which is the sales amount.
There are many examples in the forum of tiered calculations.


Commissions 2024.xlsm
ABCD
1
2Customer NameSalesCommissionCommission
3
4B200,000.0016,400.0016,400.00
5
1f
Cell Formulas
RangeFormula
C4C4=((H7-G7)*I7)+((H8-G8+1)*I8)+((H9-G9+1)*I9)+((B4-G10+1)*I10)
D4D4=B_Commission(B4)
Lambda Functions
NameFormula
B_Commission=LAMBDA(Sales,LET(s, Sales,b,{0;10000;50000;100000},r,{0.06;0.01;0.01;0.01},SUM((s>b)*(s-b)*r)))
 
Upvote 0

You can build your own factor for each set of common brackets and rates.
I will post the information for the calculation relevant for B.
The function prompts for the required input which is the sales amount.
There are many examples in the forum of tiered calculations.


Commissions 2024.xlsm
ABCD
1
2Customer NameSalesCommissionCommission
3
4B200,000.0016,400.0016,400.00
5
1f
Cell Formulas
RangeFormula
C4C4=((H7-G7)*I7)+((H8-G8+1)*I8)+((H9-G9+1)*I9)+((B4-G10+1)*I10)
D4D4=B_Commission(B4)
Lambda Functions
NameFormula
B_Commission=LAMBDA(Sales,LET(s, Sales,b,{0;10000;50000;100000},r,{0.06;0.01;0.01;0.01},SUM((s>b)*(s-b)*r)))
This won't work because if the starting slab and end slab is different from customer to customer, then this formula will not give right calculation
 
Upvote 0

Forum statistics

Threads
1,215,071
Messages
6,122,964
Members
449,094
Latest member
Anshu121

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