VBA to calculate charges
Hi Choo
A simple formula will take care of your requirement.
Suppose you have the units in cell A1 then enter the following formula
in cell B1
=IF(A1<0,0,(IF(A1<=100,A1*0.1,IF(A1<=200,10+(A1-100)*0.15,25+(A1-200)*0.2))))
And by the way the result of 150 units will be 17.5 and not 7.5. Or is
there something that I have missed...
Thanks
Karthik Bhat
Bangalore
|