Hi Haddy,
Use a lookup table. This makes it easy to edit the thresholds and rates without having to rewrite the formula.
Here's an example, using the rates and thresholds in your post.
INT is the lookup table.the first two columns are entered data—the threshold amounts in column A, and the interest rate starting at thea threshold in column B.
Column C contains the formula below, which calculates the interest charged up to each threshold.
C2: entered value — 0 (zero)
C3: =(A3−A2)×B2+C2
Fill down to last row requiring this calculation (Row 7 in example).
MAIN is the table on which the interest due is calculated. Amounts are entered in column A, all other values on the table are calculated. Calculation has been spread over four columns to show each step separately. the whole calculation can be done in a single column, using the formula shown below.
All formulas are entered in row 2, then filled down for the number of rows needed for calculating different loan amounts.
B2: =LOOKUP($A,INT::$A,INT::B)
Looks up the interest rate on the amount greater than the last passed threshold amount.
C2: =LOOKUP($A,INT::$A,INT::C)
Looks up the amount of interest charged on a loan at the last passed threshold amount.
D2: =B×(A−LOOKUP($A,INT::$A))
Looks up the last passed threshold amount, subtracts that for the amount of the current loan, and multiplies the result by the interest rate in column B.
E2: =C+D
Calculates the total interest changes by adding the interest due on amounts up to the last threshold and the interest due on the amount above that threshold.
The four formulas may be combined as follows, to return the same result:
F2: =LOOKUP($A,INT::$A,INT::C)+(A−LOOKUP($A,INT::$A))×LOOKUP($A,INT::$A,INT::B)
Regards,
Barry