View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Jacob Skaria Jacob Skaria is offline
external usenet poster
 
Posts: 8,520
Default Electricity Bill Sheet

Apply this formula in cell C2 and copy down as required

=MIN(A2,$H$1-SUM($C$1:C1))

--
Jacob


"XKruodo" wrote:

Hi,
I posted a similar question 2 days back but seems like i was not clear
enough with the question. The following table contains UNITS of electricity
and corresponding rates.

UNITS RATES
50 2.5
100 3.6
150 4.5
300 5.4

This table shows that for first 50 units consumed, rate will be 2.5 PER UNIT.
For next 100 units, rate will be 3.6 per unit. Not 50 to 100, BUT rest 100
above 50. That would total to 150. After that for next 150 units 4.5 per
unit. This totals up TOTAL UNITS to 300. For units above 300, rate will be
5.4 per unit.
If i enter 425 units in H1, i should get the following in column C as under.

UNITS RATES TOTAL UNITS
50 2.5 50
100 3.6 100
150 4.5 150
300 5.4 125

If i enter 260 units in H1, i should get the following in column C as under.

UNITS RATES TOTAL UNITS
50 2.5 50
100 3.6 100
150 4.5 110
300 5.4 0

If i enter 55 units in H1, i should get the following in column C as under.

UNITS RATES TOTAL UNITS
50 2.5 50
100 3.6 5
150 4.5 0
300 5.4 0


If i enter 35 units in H1, i should get the following in column C as under.

UNITS RATES TOTAL UNITS
50 2.5 35
100 3.6 0
150 4.5 0
300 5.4 0