I guess my formula should have been like thi
=CHOOSE(LOOKUP(A1,{0,1;5000,2;15000,3;25000,4}),0,INT((A1-5000)/1000)*1,INT((A1-15000)/1000)*1.5+10,INT((A1-25000)/1000)*1.75+25)
The *1 was added to show where the $1.00 rate is, the others are easy to
understand. I will explain what the formula is doing, and I think that should
help you out a bit.
First, I broke the gallons up into 4 categories, 0, 5000, 15000, and 25000,
then I assigned a category number to these of 1, 2, 3, 4. This is done by the
LOOKUP. 0-4999 = category 1, 5000-14999 = category 2, 15000-24999 = category
3, and 25000+ = category 4.
The choose function works like this:
=CHOOSE(INDEX,choice1,choice2,choice3,choice4). It must have at least 2
arguments, the INDEX, and the first choice. The index needs to be a whole
number, starting with 1, which is why I did the categories 1-4 as above.
Then, I needed formulas to calculate the overage for each category.
Category 1 is the first argument after the lookup, is 0, since obviously
they had no overage, therefore there will be no overage charge.
Category 2 is the second argument after the lookup:
INT((A1-5000)/1000)*1
This will take the total amount of gallons-5000 that won't be charged as
overage, then divides by the 1000. Since you are billing for only 1000 gallon
increments, I needed the INTeger function, then I multiply by the rate (1).
Category 3 is the 3rd argument after the lookup:
INT((A1-15000)/1000)*1.5+10
Same thought process here, calculate the total number of 1000 gallon
increments that fall into this category and multiply by its category rate
(1.5), but I have to remember what the total charge for the gallons from
category 1, which is represented by the +10 (10*1)
Category 4 is the 4th (and final) argument after the lookup:
INT((A1-25000)/1000)*1.75+25
Identical to thought process for Category 3, calculating the total number of
1000 gallon increments that fall into this category multiplied by its
category rate (1.75), and adding the total charge for all 1000 gallon
increments for categories 2 & 3 which is represented by the +25 (10*1 + 1.5*1)
So, to answer your question, lol, you could make your formula like this
=CHOOSE(LOOKUP(A1,{0,1;5000,2;15000,3;25000,4}),0,INT((A1-5000)/1000)*0.75,INT((A1-15000)/1000)*1.25+7.50,INT((A1-25000)/1000)*1.50+20)