Greater Than and less than HELP PLEASE

C

Chris In Need

Tried for hours to get this to work and ready to throw laptop out of window.

What I'm trying to do :

enter mileage into A1

For first 200 miles charge £0.40 per mile for miles above 200 Charge £0.25
per mile and enter combinded charge into A2.

and if mileage is less than 200 in A1 carry balance (200-A1) over to B1 to
increase B1 £0.40 rate i.e 200 plus balance from A1

Hope that makes sense . Many Thanks for any help.
 
B

Brad

If I got this right
=min(200,a1)*.4+max(0,a1-200)*.25
or
=if(a1<=200,a1*.4,80+(a1-200)*.25)

Either one should work
 
B

Bernie Deitrick

Chris,

I think.....

In A2:

=MIN(A1,200)*0.4+(A1>200)*(A1-200)*0.25

In B2:

=MIN(B1,200+(A1<200)*(200-A1))*0.4+(B1>(200+(A1<200)*(200-A1)))*(B1-(200+(A1<200)*(200-A1)))*0.25

Bernie
 
J

joeu2004

On May 8, 1:47 pm, Chris In Need <Chris In Need
enter mileage into A1
For first 200 miles charge £0.40 per mile for miles
above 200 Charge £0.25 per mile and enter combinded
charge into A2.

In A2:

=0.40*min(A1,200) + 0.25*max(0,200-A1)

and if mileage is less than 200 in A1 carry balance
(200-A1) over to B1 to increase B1 £0.40 rate i.e
200 plus balance from A1[.] Hope that makes sense

Not entirely, I'm afraid. I don't understand "increase B1 0.40 rate"
and "200 plus balance".

Perhaps something like the following in B1:

=expression + 0.40*max(0,200-A1)

where "expression" is the formula you already have in B1.


------ original posting -----
 
C

Chris In Need

Gratful to all for quick response.

I should have asked the question hours ago !!

Many Thanks,

Chris.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top