Can someone help me to correct the formula and arrive at correct result ?

RapchikM

Board Regular
Joined
Oct 5, 2020
Messages
97
Office Version
  1. 2021
Platform
  1. Windows
Hello

I think i've made a mistake in writing the formula to derive the exact answer

EFGHI
000-100 Units1102.18239.8
101-300 Units2205.361179.2
301-500 Units22011.622556.4
Above 500 Units17112.562147.76

E29 = 721

Formula in H21 =IF($E29<=$G$18,$G$18*$H$18,IF($E29<=$G$19,(($G$18*$H$18)+($E29-100)*5.36),IF($E29<=$G$21,(($G$18*$H$18)+($G$19*$H$19)+(($E29-300)*$H$20)),(($G$18*$H$18)+($G$19*$H$19)+($G$20*$H$20)+(($E29-$G$21)*$H$21)))))

answer = 10883.40 instead of 6123.16

another try
E31 = 721
Formula in H21 =IF($E31<=$G$18,$G$18*$H$18,IF($E31<=$G$19,(($G$18*$H$18)+($E31-220)*5.36),IF($E31<=$G$21,(($G$18*$H$18)+($G$19*$H$19)+(($E31-220)*$H$20)),(($G$18*$H$18)+($G$19*$H$19)+($G$20*$H$20)+(($E31-(G$21+G$20+G$19+G$18))*$H$21)))))

Answer is 3975.4 instead of 6123.16

So summing of 239.8+1179.2+2556.4+2147.76 = 6123.16

Your help shall be appreciated

Thanks
RapchikM
 
At Last Succeded Thank you Sir

HELP-INCORRECTION FORMULA.xlsx
DEFGHIJK
15
16
17UnitsRateAmount
18000-100 Units1102.18239.8
19101-300 Units2205.361179.2
20301-500 Units22011.622556.4
21Above 500 Units17112.562147.76
22
23
24
25
26
27
28
2972110883.4
30
317213975.4
32
33
Sheet1
Cell Formulas
RangeFormula
I18:I21I18=G18*H18
H29H29=IF($E29<=$G$18,$G$18*$H$18,IF($E29<=$G$19,(($G$18*$H$18)+($E29-100)*5.36),IF($E29<=$G$21,(($G$18*$H$18)+($G$19*$H$19)+(($E29-300)*$H$20)),(($G$18*$H$18)+($G$19*$H$19)+($G$20*$H$20)+(($E29-$G$21)*$H$21)))))
H31H31=IF($E31<=$G$18,$G$18*$H$18,IF($E31<=$G$19,(($G$18*$H$18)+($E31-220)*5.36),IF($E31<=$G$21,(($G$18*$H$18)+($G$19*$H$19)+(($E31-220)*$H$20)),(($G$18*$H$18)+($G$19*$H$19)+($G$20*$H$20)+(($E31-(G$21+G$20+G$19+G$18))*$H$21)))))


Pl Remember 6123.16 should be in either H29 or H31
RapchikM
 
Upvote 0

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
What are the amounts for the respective tiers (brackets)?
If you use the data in column E what amount do you calculate for 721 units?

Commissions 2023_x.xlsm
EFGHI
16UnitsRateAmount
17
18000-100 Units02.18218.00
19101-300 Units1005.361,072.00
20301-500 Units30011.622,324.00
21Above 500 Units50012.562,775.76
221E+356,389.76
23
24
257216,389.766,389.76
3b
Cell Formulas
RangeFormula
G22G22=10^35
I18:I20I18=(G19-G18)*H18
I21I21=(E25-G21)*H21
I22I22=SUM(I18:I21)
G25G25=SUM((E25>G18:G21)*(E25-G18:G21)*(H18:H21-H17:H20))
H25H25=SUMPRODUCT(--(E25>G18:G21),E25-G18:G21,H18:H21-H17:H20)
 
Upvote 0
How did you calculate the numbers in column G?
The bracket information indicates 0-100 @ 2.18
 
Upvote 0
Dave Patton
How did you calculate the numbers in column G?
The bracket information indicates 0-100 @ 2.18
Thanks for your formulas in #12. but did not derive at to 6213.16. But then again you asked your doubt as above quoted

Actually in obtaining and exectuing XL2BB i forgot to state there is 10% penalty in each slab so therfore from 100 it becomes 110, 200-becomes 220 and so on. As total units consumed are 721 so therfore from 721 we substract 220-220-110 and balance we have 171

Hope this clarifies
Rapchik
 
Upvote 0
If your penalty is calculated by just changing the brackets, try the formula with the edit.

With correct information, you could build your own function with Lambda.

Commissions 2023_x.xlsm
EFGHI
15
16UnitsRateAmount
17
1802.18239.80
191105.361,179.20
2033011.622,556.40
2155012.562,147.76
221E+356,123.16
23
24
257216,123.166,123.16
26
3b
Cell Formulas
RangeFormula
G22G22=10^35
I18:I21I18=MAX(0,MIN($E$25-G18,G19-G18)*H18)
I22I22=SUM(I18:I21)
G25G25=SUM((E25>G18:G21)*(E25-G18:G21)*(H18:H21-H17:H20))
H25H25=SUMPRODUCT(--(E25>G18:G21),E25-G18:G21,H18:H21-H17:H20)
 
Upvote 0
Solution
Dear Dave Patton

Thanks for the Formulas.

How you got 330 units in G20. If you Study the slab in E20 it mentions 301-500 Units therfore 200 Units and penalty 10% on 200 = 220
even @ 220 in G20 i Get the Sum Total as 6578.42 instead of 6123.16 with both respective formulas
also H17 is blank

See below
 
Last edited:
Upvote 0
HELP-INCORRECTION FORMULA.xlsx
EFGHI
16UnitsRateAmount
17
18000-100 Units1102.18239.8
19101-300 Units2205.361179.2
20301-500 Units22011.622556.4
21Above 500 Units17112.562147.76
226123.16
23
24
25
26
27
28
297216578.42
30
317216578.42
32
33
Sheet1
Cell Formulas
RangeFormula
I18:I21I18=G18*H18
I22I22=SUM(I18:I21)
H29H29=SUM((E29>G18:G21)*(E29-G18:G21)*(H18:H21-H17:H20))
H31H31=SUMPRODUCT(--(E31>G18:G21),E31-G18:G21,H18:H21-H17:H20)
 
Upvote 0
How you got 330 units in G20. If you Study the slab in E20 it mentions 301-500 Units therfore 200 Units and penalty 10% on 200 = 220
Dave's formulas are based on the difference between the bands so 330 - 110 = 220

Have a read of the link below which explains the theory of the sumproduct formula

The "How it works" link on the page is below (reworded)

 
Last edited:
Upvote 0
Upvote 0

Forum statistics

Threads
1,221,487
Messages
6,160,113
Members
451,619
Latest member
KunalGandhi

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