SUMPRODUCT on two sets of ranges to calculate accumulated sum values

Capolavoro009

New Member
Joined
Dec 11, 2024
Messages
7
Office Version
  1. Prefer Not To Say
Platform
  1. MacOS
Apologies for garbled image below but what I’m trying to do is to determine which range my value falls between 0-60,703,125 and so on and then return corresponding commission value on the table range on the right hand side between 0-607,031

In addition as my value falls in different tiers (slices) I want to apply the corresponding commission for preceding steps plus the delta step.

For example:
If my stock value is 80,000,000 then the first 60,703,125 should be 607031 while 80million-60,7 million should be falling in the slice between 607031 and 1214062.

Thank you in advance for the help 🙏
Stock Value TiersRev Share %agePaid Commissions 60703125
10%R 0.00R 60,703,125.0010%0R 607,031.25
15%R 60,703,125.00R 91,054,687.5020%R 607,031.25R 1,214,062.50
20%R 91,054,687.50R 121,406,250.0030%R 1,214,062.50R 1,821,093.75
60%R 121,406,250.00R 364,218,750.0040%R 1,821,093.75R 2,428,125.00
100%R 364,218,750.00R 607,031,250.0060%R 2,428,125.00R 3,642,187.50
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
Welcome to the MrExcel forum!

I had a little trouble figuring out your tables, but I think I got the gist. I rearranged your table slightly, but you should be able to adapt as needed:

Book1
ABCDEFG
1Stock ValueTier MinimumTier MaximumPayout RateDeltaCommission
280000000$ -$ 60,703,125.0010.00%10.00%$ 6,070,312.50
3$ 60,703,125.00$ 121,406,250.0020.00%10.00%$ 3,859,375.00
4$ 121,406,250.00$ 182,109,375.0030.00%10.00%$ -
5$ 182,109,375.00$ 242,812,500.0040.00%10.00%$ -
6$ 242,812,500.00$ 364,218,750.0060.00%20.00%$ -
7
8$9,929,687.50$ 9,929,687.50
Sheet1
Cell Formulas
RangeFormula
F2:F6F2=E2-N(E1)
G2:G6G2=MEDIAN(0,D2-C2,A$2-C2)*E2
F8F8=SUMPRODUCT((A2-C2:C6),F2:F6,--(A2>=C2:C6))
G8G8=SUM(G2:G6)


A2 has your stock value, C:D has your tier ranges, low to high, E has the payout rate for that tier. At this point you have 2 options. In column F is a simple formula that just calculates the difference between the payout rates. Then the F8 formula uses the C:F ranges to calculate the total payout. Or in column G there is a formula that calculates the amount for the tier on that row. Then the G8 formula just sums them up. It's a nice check that they match.

So you can use one of those options. I'm not sure what you want to do with your original table on the left, but you can do the same thing with that, or choose the table you want to use based on some parameter.
 
Upvote 0
a little more concise

Commission Cumulative Sales.xlsm
AB
1280,000,0009,929,687.50
13
14Tier MinimumPayout Rate
15
1600.1
1760,703,1250.2
18121,406,2500.3
19182,109,3750.4
20242,812,5000.6
21
1e
Cell Formulas
RangeFormula
B12B12=SUM((A12>A16:A20)*(A12-A16:A20)*(B16:B20-B15:B19))
 
Upvote 0
Thank you very much but it seems like every time i need to input a different stock value individually to calculate commissions, is that right?

is there a way to calculate commissions based on following?:

Stock Value Tier Min Tier Max Payout Rate Delta Commission
60,703,125 - 60,703,12510%10% 6,070,313
91,054,688 60,703,125 91,054,68820%10% -
303,515,625 91,054,688 121,406,25030%10%
121,406,250 364,218,75040%10%
364,218,750 607,031,25060%20%
 
Upvote 0
BAsically this is the original table:

Stock Value Stock Value Tiers Paid Commissions
10% ZAR - ZAR 60,703,1250 ZAR 607,031
15% ZAR 60,703,125 ZAR 91,054,688 ZAR 607,031 ZAR 1,214,063
20% ZAR 91,054,688 ZAR 121,406,250 ZAR 1,214,063 ZAR 1,821,094
60% ZAR 121,406,250 ZAR 364,218,750 ZAR 1,821,094 ZAR 2,428,125
100% ZAR 364,218,750 ZAR 607,031,250 ZAR 2,428,125 ZAR 3,642,188



So if the stock falls between 91,054,688 & 121,406,250, first 60,703,125 should get a commission of 607,031 while the balance should get a difference of 1,214,063 and 607,031, whatever that number is.

I hope this is clear and apologies for back and forth...
 
Upvote 0
If you are using an old version of Excel and/or if you prefer to use SumProduct, the same logic applies. =SUMPRODUCT(--(A2>aB),(A2-aB),aR)
What results do you expect for the values shown in A13:A15
Did you try the formula suggested?
You can name the bracket information and the rate differential information


Commission Cumulative Sales.xlsm
ABC
1
280,000,0009,929,687.509,929,687.50
3
4Tier MinimumPayout Rate
5
6010%
760,703,12520%
891,054,68830%
9121,406,25040%
10364,218,75060%
11
12
1380,000,0009,929,687.50
14200,000,00052,683,593.70
15400,000,000139,839,843.70
1e
Cell Formulas
RangeFormula
B2B2=SUM((A2>$A$6:$A$10)*(A2-$A$6:$A$10)*($B$6:$B$10-$B$5:$B$9))
C2C2=SUM((A2>aB)*(A2-aB)*aR)
B13:B15B13=SUM((A13>aB)*(A13-aB)*aR)
 
Last edited:
Upvote 0
If you are using an old version of Excel and/or if you prefer to use SumProduct, the same logic applies. =SUMPRODUCT(--(A2>aB),(A2-aB),aR)
What results do you expect for the values shown in A13:A15
Did you try the formula suggested?
You can name the bracket information and the rate differential information


Commission Cumulative Sales.xlsm
ABC
1
280,000,0009,929,687.509,929,687.50
3
4Tier MinimumPayout Rate
5
6010%
760,703,12520%
891,054,68830%
9121,406,25040%
10364,218,75060%
11
12
1380,000,0009,929,687.50
14200,000,00052,683,593.70
15400,000,000139,839,843.70
1e
Cell Formulas
RangeFormula
B2B2=SUM((A2>$A$6:$A$10)*(A2-$A$6:$A$10)*($B$6:$B$10-$B$5:$B$9))
C2C2=SUM((A2>aB)*(A2-aB)*aR)
B13:B15B13=SUM((A13>aB)*(A13-aB)*aR)
Hi Dave,

The issue is that the stock value sits in one range however the commission value sits in the other and the target is to check which tier/slab the stock value sits and then calculate the commission payable from the other tier. The %age values literally become irrelevant, at least from what i am trying to achieve.

Stock Value TiersPaid Commissions
ZAR -ZAR 60,703,1250ZAR 607,031
ZAR 60,703,125ZAR 91,054,688ZAR 607,031ZAR 1,214,063
ZAR 91,054,688ZAR 121,406,250ZAR 1,214,063ZAR 1,821,094
ZAR 121,406,250ZAR 364,218,750ZAR 1,821,094ZAR 2,428,125
ZAR 364,218,750ZAR 607,031,250ZAR 2,428,125ZAR 3,642,188
 
Upvote 0
Are you trying to calculate the commission or are you trying to fill blanks in a form?
What results do you require from the values cited?
 
Upvote 0
I will have stock values according to the ranges above. I want to calculate and populate the commissions based on the tier
 
Upvote 0
I will have stock values according to the ranges above. I want to calculate and populate the commissions based on the tier
for example:

if the stock value is ZAR 91,054,688, for the first ZAR 60,703,125, the calculated commission should be ZAR 607,031 PLUS the "remaining" (91,054,688-60,703,125) should be calculated automatically between ZAR 607,031 & ZAR 1,214,063 and so on..
 
Upvote 0

Forum statistics

Threads
1,226,112
Messages
6,189,041
Members
453,521
Latest member
Chris_Hed

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