Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 14
Default Formula Help - Perform a calculation only if the result falls between 2 values

I have 4 columns (Weight, Rate, Min Charge, Max Charge). I am looking
for a formula that will return the correct charge whether it be the
Weight*Rate calculation, Min Charge or the Max Charge.

If the Weight*Rate is less than the Min Charge then return the Min
Charge.
If the Weight*Rate is greater than the Max charge then return the Max
Charge.
If the Weight*Rate is between the Min Charge and the Max Charge return
the Weight*Rate calculation.

Sample Data:

Weight Rate Min Max
1280 $4.70 $89.00 $225.00
6598 $4.50 $124.00 $270.00

(1280 is in cell A2)

Thanks for your help!

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default Formula Help - Perform a calculation only if the result falls betw

Matt,

Try:-

=IF(A2*B2D2,D2,IF(A2*B2<C2,C2,IF(AND(A2*B2C2,A2* B2<D2),A2*B2,)))
Mike

"Matt.Russett" wrote:

I have 4 columns (Weight, Rate, Min Charge, Max Charge). I am looking
for a formula that will return the correct charge whether it be the
Weight*Rate calculation, Min Charge or the Max Charge.

If the Weight*Rate is less than the Min Charge then return the Min
Charge.
If the Weight*Rate is greater than the Max charge then return the Max
Charge.
If the Weight*Rate is between the Min Charge and the Max Charge return
the Weight*Rate calculation.

Sample Data:

Weight Rate Min Max
1280 $4.70 $89.00 $225.00
6598 $4.50 $124.00 $270.00

(1280 is in cell A2)

Thanks for your help!


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,651
Default Formula Help - Perform a calculation only if the result falls between 2 values

=MEDIAN(A2*B2,C2,D2)
--
David Biddulph

"Matt.Russett" wrote in message
ps.com...
I have 4 columns (Weight, Rate, Min Charge, Max Charge). I am looking
for a formula that will return the correct charge whether it be the
Weight*Rate calculation, Min Charge or the Max Charge.

If the Weight*Rate is less than the Min Charge then return the Min
Charge.
If the Weight*Rate is greater than the Max charge then return the Max
Charge.
If the Weight*Rate is between the Min Charge and the Max Charge return
the Weight*Rate calculation.

Sample Data:

Weight Rate Min Max
1280 $4.70 $89.00 $225.00
6598 $4.50 $124.00 $270.00

(1280 is in cell A2)

Thanks for your help!



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,651
Default Formula Help - Perform a calculation only if the result falls betw

Note that Mike's formula will return the answer FALSE if A2*B2=C2 or if
A2*B2=D2. If you want to go down the route of using that sort of formula,
you could simplify it to =IF(A2*B2D2,D2,IF(A2*B2<C2,C2,A2*B2)), but the
MEDIAN formula is a bit shorter.
--
David Biddulph

"Mike H" wrote in message
...
Matt,

Try:-

=IF(A2*B2D2,D2,IF(A2*B2<C2,C2,IF(AND(A2*B2C2,A2* B2<D2),A2*B2,)))
Mike


"Matt.Russett" wrote:

I have 4 columns (Weight, Rate, Min Charge, Max Charge). I am looking
for a formula that will return the correct charge whether it be the
Weight*Rate calculation, Min Charge or the Max Charge.

If the Weight*Rate is less than the Min Charge then return the Min
Charge.
If the Weight*Rate is greater than the Max charge then return the Max
Charge.
If the Weight*Rate is between the Min Charge and the Max Charge return
the Weight*Rate calculation.

Sample Data:

Weight Rate Min Max
1280 $4.70 $89.00 $225.00
6598 $4.50 $124.00 $270.00

(1280 is in cell A2)

Thanks for your help!




  #5   Report Post  
Posted to microsoft.public.excel.misc
bj bj is offline
external usenet poster
 
Posts: 1,397
Default Formula Help - Perform a calculation only if the result falls betw

=min(Max_charge, max(Min charge,Weight*rate))

"Matt.Russett" wrote:

I have 4 columns (Weight, Rate, Min Charge, Max Charge). I am looking
for a formula that will return the correct charge whether it be the
Weight*Rate calculation, Min Charge or the Max Charge.

If the Weight*Rate is less than the Min Charge then return the Min
Charge.
If the Weight*Rate is greater than the Max charge then return the Max
Charge.
If the Weight*Rate is between the Min Charge and the Max Charge return
the Weight*Rate calculation.

Sample Data:

Weight Rate Min Max
1280 $4.70 $89.00 $225.00
6598 $4.50 $124.00 $270.00

(1280 is in cell A2)

Thanks for your help!


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
Create formula-if value A falls between values B and C in time for Don Excel Discussion (Misc queries) 5 May 2nd 07 08:30 PM
How do I perform calculation on Filtered data Alvin Excel Discussion (Misc queries) 1 December 3rd 06 03:37 AM
formula result #value! needs to equal zero for average calculation LauraRose Excel Worksheet Functions 3 March 13th 06 06:13 PM
comparing two columns & then perform a calculation dazp1970 Excel Worksheet Functions 2 September 10th 05 01:17 PM
Perform functions on the result of adding two columns Tim Archer Excel Worksheet Functions 2 February 2nd 05 03:25 PM


All times are GMT +1. The time now is 09:15 PM.

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

About Us

"It's about Microsoft Excel"