View Single Post
  #6   Report Post  
Bernard Liengme
 
Posts: n/a
Default

How about
=A1*0.06+(A1600)*(A1-600)*0.02+(A1800)*(A1-800)*0.04+(A11000)*(A1-10000)*0.05+(A11200)*(A1-1200)*0.15
OR
=MIN(A1,600)*0.06+MAX(0,MIN(200,A1-600))*0.08+MAX(0,MIN(200,A1-800))*0.1+MAX(0,MIN(200,A1-1000))*0.15+MAX(0,A1-1200)*0.3

To quote my Irish math teacher from long ago:there are more ways of killing
a pig than stuffing it with butter!
--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

"Dave Smith" wrote in message
...
Thanks Vasant.

Now what if the rate calculation gets more complicated? Is there some way
to use a lookup table? For example:

0-600 costs .06 per kwH
601-800 costs .08 per kwH over 600
801-1000 costs .10 per kwH over 800
1001-1200 costs .15 per kwH over 1000
1200 costs .30 per kwH over 1200



"Vasant Nanavati" wrote:

=IF(A1<=600,A1*0.06,36+(A1-600)*0.08)

--

Vasant



"Dave Smith" <Dave wrote in message
...
I'm trying to calculate an electricity bill which uses different values

based
on the amount used. For the first 600 kwh, the charge is .06/kwh. For
anything above 600 kwh, the charge is .08/kwh. So if my usage is 700
kwh,

my
bill is $36+$8. Any ideas on which formula I should use for this?