Electricity Billing Calculation

sooshil

Board Regular
Joined
Feb 21, 2013
Messages
104
Office Version
  1. 365
Platform
  1. Windows
  2. Mobile
I wanted to use the easiest formula for to calculate the total amount in the following excel sheet. The conditions required for the calculation is in the another table below. Please help me to find the easiest formula.

Thanks in advance.

IDCustomer NameCustomer TypePrevious ReadingCurrent ReadingUnit ConsumedTotal Amount
1AngelinaDomestic1258132062
2BoydDomestic14851698213
3StevenAgriculture1103117067
4JoeIndustry25662891325
5JohnAgriculture16541841187

<tbody>
</tbody>

Conditons:

Customer TypeMinimum Charge Upto 20 unitsFor Consumed Unit between 21-250, additional cost per unitFor Consumed Unit above 250, additional cost per unit
Domestic$ 80.00$ 7.30$ 11.25
Industry$ 200.00$ 10.15$ 15.5
Agriculture$ 50.00$ 5.40$ 7

<tbody>
</tbody>
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
Do a Google for tiered pricing.
Looks like SUMPRODUCT may yield a solution but I haven't tried this sort of thing before.
 
Upvote 0
Do a Google for tiered pricing.
Looks like SUMPRODUCT may yield a solution but I haven't tried this sort of thing before.

I couldn't get anything after various search.
Would you please get into my problem and suggest the solution?

Thanks.
 
Upvote 0
Customer data in A to F . F =units used. formula in G . tarrif table in M to O

=VLOOKUP(C2,$M$2:$O$5,2,FALSE)+IF($F2<=20,0,VLOOKUP($C2,$M$2:$O$5,3,FALSE)*MIN($F2-20,250-20))+IF($F2<=250,0,($F2-250)*(VLOOKUP($C2,$M$2:$P$5,4,FALSE)))

but to make it easier to follow suggest you have 4 columns

G =VLOOKUP(C2,$M$2:$O$5,2,FALSE) this is in charge $

H =IF($F2<=20,0,VLOOKUP($C2,$M$2:$O$5,3,FALSE)*MIN($F2-20,250-20)) 2nd tier charges

I =IF($F2<=20,0,VLOOKUP($C2,$M$2:$O$5,3,FALSE)*MIN($F2-20,250-20)) top level charges

then ad together in the last column
 
Last edited:
Upvote 0
Customer data in A to F . F =units used. formula in G . tarrif table in M to O

=VLOOKUP(C2,$M$2:$O$5,2,FALSE)+IF($F2<=20,0,VLOOKUP($C2,$M$2:$O$5,3,FALSE)*MIN($F2-20,250-20))+IF($F2<=250,0,($F2-250)*(VLOOKUP($C2,$M$2:$P$5,4,FALSE)))

Why M to O only

That tariffs table takes the range M1:P4. isn't it?

Please make it clear once.
 
Upvote 0
Putting the main table in A1:G6 and putting the conditions in A10:D13 this works placed in G2 and copied down.

=VLOOKUP(C2,$A$10:$D$13,2,0)+IF(F2>250,((F2-250)*VLOOKUP(C2,$A$10:$D$13,4,0)),0)+IF(F2>250,230*VLOOKUP(C2,$A$10:$D$13,3,0),(F2-20)*VLOOKUP(C2,$A$10:$D$13,3,0))
 
Upvote 0
=IF(F2>250,(20*VLOOKUP(C2,$A$12:$D$14,2,0))+(230*VLOOKUP(C2,$A$12:$D$14,3,0))+((F2-250)*VLOOKUP(C2,$A$12:$D$14,4,0)),IF(F2>20,(20*VLOOKUP(C2,$A$12:$D$14,2,0))+((F2-20)*VLOOKUP(C2,$A$12:$D$14,3,0)),F2*VLOOKUP(C2,$A$12:$D$14,2,0)))
"$A$12:$D$14" is the array for the price structure
<colgroup><col width="820" style="width: 615pt; mso-width-source: userset; mso-width-alt: 29988;"> <tbody> </tbody>
 
Upvote 0
Putting the main table in A1:G6 and putting the conditions in A10:D13 this works placed in G2 and copied down.

=VLOOKUP(C2,$A$10:$D$13,2,0)+IF(F2>250,((F2-250)*VLOOKUP(C2,$A$10:$D$13,4,0)),0)+IF(F2>250,230*VLOOKUP(C2,$A$10:$D$13,3,0),(F2-20)*VLOOKUP(C2,$A$10:$D$13,3,0))

Dear Steve

Your formula is unable to maintain the minimum cost. i.e. If a domestic user consumes less than 20 units, then the charge must be Rs. 80 as this is the minimum cost.

This is not working in your formula. Other I am checking. Any way thanks.
 
Upvote 0
=IF(F2>250,(20*VLOOKUP(C2,$A$12:$D$14,2,0))+(230*VLOOKUP(C2,$A$12:$D$14,3,0))+((F2-250)*VLOOKUP(C2,$A$12:$D$14,4,0)),IF(F2>20,(20*VLOOKUP(C2,$A$12:$D$14,2,0))+((F2-20)*VLOOKUP(C2,$A$12:$D$14,3,0)),F2*VLOOKUP(C2,$A$12:$D$14,2,0)))
"$A$12:$D$14" is the array for the price structure

<tbody>
</tbody>

Dear Vogel

Your formula calculates wrongly.
For 19 units consumed by a domestic user, it gives the bill of 1520. Which is not what we need. Any way thank you very much for your concern. Please kindly suggest the correction(s) if any.
 
Upvote 0

Forum statistics

Threads
1,214,651
Messages
6,120,738
Members
448,988
Latest member
BB_Unlv

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