Water Billing Rates Formula

EvanBerrett

New Member
Joined
Mar 25, 2020
Messages
8
Office Version
  1. 365
Platform
  1. Windows
I am trying to create a formula that allows me to evaluate scenarios for water billing rates. These rates use a progressive tier system and I'm trying to calculate the monthly bill based on total water consumption. So for example:

Consumption: 200 Kgal

Tiers:

A: 0 - 6 Kgal

B: 6 - 12 Kgal

C: 12 - 18 Kgal

D: 18+ Kgal



Rates:

A: $0.80/Kgal

B: $0.85/Kgal

C: $0.90/Kgal

D: $0.95/Kgal



So assuming 200 Kgals used, the first 6 Kgal will be at $0.80/Kgal, the second 6 Kgal will be billed at $0.85/Kgal, the third 6 Kgal will be billed at $0.90/Kgal, and anything over 18 Kgal will be billed at $0.95/Kgal.

Any help with a formula that can help me accomplish this would be great. Thanks in Advance.
 

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.
ok, we can do a nested IF
what happens at 6Kg , 12 , 18 is it the lower of higher value as you have those listed twice
 
Upvote 0
=IF(A2<=6,A2*0.8,IF(A2<=12,(6*0.8)+((A2-6)*0.85),IF(A2<=18,((6*0.8)+(6*0.85)+((A2-12)*0.9)),((6*0.8)+(6*0.85)+(6*0.9)+((A2-18)*0.95)))))
does this work for you ?
 
Upvote 0
Cross posted Water Billing Rates Formula - OzGrid Free Excel/VBA Help Forum

While we do allow Cross-Posting on this site, we do ask that you please mention you are doing so and provide links in each of the threads pointing to the other thread (see rule 13 here along with the explanation: Forum Rules). This way, other members can see what has already been done in regards to a question, and do not waste time working on a question that may already be answered.
 
Upvote 0
=IF(A2<=6,A2*0.8,IF(A2<=12,(6*0.8)+((A2-6)*0.85),IF(A2<=18,((6*0.8)+(6*0.85)+((A2-12)*0.9)),((6*0.8)+(6*0.85)+(6*0.9)+((A2-18)*0.95)))))
does this work for you ?

It does, thank you very much :)
 
Upvote 0
Three versions of the SumProduct formula.
Try each or the version that you prefer.

T202003a.xlsm
BCDE
1Number Kgal200.00
2Amount188.20 188.20 188.20
3
4UnitsRatesRate Diff
5
600.800.80
760.850.05
8120.900.05
9180.950.05
10
11188.2
7a
Cell Formulas
RangeFormula
C2C2=SUMPRODUCT(--(C1>=B6:B9),--(C1-B6:B9),D6:D9)
D2D2=SUMPRODUCT(--(C1>B6:B9),--(C1-B6:B9),(C6:C9-C5:C8))
E2E2=SUMPRODUCT(--(C1>B6:B9),--(C1-B6:B9),{0.8;0.05;0.05;0.05})
D6D6=C6-N(C4)
D7:D9D7=C7-N(C6)
B11B11=6*0.8+6*0.85+6*0.9+182*0.95


D2 does not require D4:D9
E2 does not require the Rate Table the formula should be =SUMPRODUCT(--(C1>{0;6;12;18}),--(C1-{0;6;12;18}),{0.8;0.05;0.05;0.05})

Arithmetic
=(A2>0)*A2*0.8+(A2>6)*(A2-6)*0.05+(A2>12)*(A2-12)*0.05+(A2>18)*(A2-18)*0.05
 
Last edited:
Upvote 0
Three versions of the SumProduct formula.
Try each or the version that you prefer.

T202003a.xlsm
BCDE
1Number Kgal200.00
2Amount188.20 188.20 188.20
3
4UnitsRatesRate Diff
5
600.800.80
760.850.05
8120.900.05
9180.950.05
10
11188.2
7a
Cell Formulas
RangeFormula
C2C2=SUMPRODUCT(--(C1>=B6:B9),--(C1-B6:B9),D6:D9)
D2D2=SUMPRODUCT(--(C1>B6:B9),--(C1-B6:B9),(C6:C9-C5:C8))
E2E2=SUMPRODUCT(--(C1>B6:B9),--(C1-B6:B9),{0.8;0.05;0.05;0.05})
D6D6=C6-N(C4)
D7:D9D7=C7-N(C6)
B11B11=6*0.8+6*0.85+6*0.9+182*0.95


D2 does not require D4:D9
E2 does not require the Rate Table the formula should be =SUMPRODUCT(--(C1>{0;6;12;18}),--(C1-{0;6;12;18}),{0.8;0.05;0.05;0.05})

Arithmetic
=(A2>0)*A2*0.8+(A2>6)*(A2-6)*0.05+(A2>12)*(A2-12)*0.05+(A2>18)*(A2-18)*0.05

This is fantastic, thank you!
 
Upvote 0

Forum statistics

Threads
1,224,816
Messages
6,181,141
Members
453,021
Latest member
Justyna P

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