Hello everyone. I am new to this forum and to complex formulas in Excel, and am trying to calculate a formula using a multiple tiered pricing model. I have searched MANY posts and tried multiple formulas with no luck. I need to be able to input the amount of gallons used and have it calculate the total cost. If someone uses 18,000 gallons, it needs to charge the first 5000 gallons at $3/per 1000 gallons + the next 5000 gallons at $3.45/1000 gallons and so on. There is also a base charge regardless of any gallons used. My model looks like this:
Charge Rate Cost Per 1000 gallons
Base Charge $21.53
0 to 5,000 gallons $3.00
5,001 to 10,000 gallons $3.45
10,001 to 15,000 gallons $3.97
15,001 to 20,000 gallons $4.56
20,001 to 25,000 gallons $5.25
>25,001 gallons $6.03
The formula I have had the most success with is below, however it doesn't seem to be adding the different tiers together and only calculating based on what tier the amount falls in. Using the above example, it will only calculate 18000 gallons at $4.56/1000 gallons, instead of the 2 previous tiers. Excel also tells me I have too many arguments in the string if I input all the tiers. Does anyone have ideas for a better formula, or help with why mine is not producing the correct answers? Thank you so much!
=IF(AND(E3>0,E3<=5000),((E3-0)/1000)*3,IF(AND(E3>5001,E3<=10000),((E3-5001)/1000)*3.45,IF(AND(E3>10001,E3<=15000),((E3-10001)/1000)*3.97,IF(AND(E3>15001,E3<=20000),((E3-15001))/1000)*4.56)))+21.53
Bookmarks