Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Greater Than and less than HELP PLEASE

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.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,441
Default Greater Than and less than HELP PLEASE

Chris,

I think.....

In A2:

=MIN(A1,200)*0.4+(A1200)*(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


"Chris In Need" <Chris In Need @discussions.microsoft.com wrote in message
...
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.



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 846
Default Greater Than and less than HELP PLEASE

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
--
Wag more, bark less


"Chris In Need" wrote:

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.

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,059
Default Greater Than and less than HELP PLEASE

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 -----

On May 8, 1:47*pm, Chris In Need <Chris In Need
@discussions.microsoft.com wrote:
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. *


  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Greater Than and less than HELP PLEASE

Gratful to all for quick response.

I should have asked the question hours ago !!

Many Thanks,

Chris.


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I set a value greater or less than Docwhitley Excel Worksheet Functions 1 July 2nd 07 07:48 PM
greater than but less than Aaron Excel Discussion (Misc queries) 5 April 21st 07 09:00 PM
Greater Than but Less than KaraGilsdorf Excel Worksheet Functions 5 October 18th 06 08:42 PM
if greater then 99 then 1 if greater then 199 then two N.R. Excel Worksheet Functions 2 June 23rd 05 06:14 PM
Greater then/less then campsoup1988 Excel Worksheet Functions 5 January 16th 05 07:27 PM


All times are GMT +1. The time now is 01:17 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"