Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Calculating a Formula Subject to a Maximum and Minimum Value

I am having trouble coming up with a correct formula and I am hoping that someone may be able to help. I am trying to multiply two numbers in two different cells, but have the product subject two a minimum amount that is located in another cell and a maximum amount located in another cell so that the formula returns either the actual product, or the minimum value if the actual product is less than the minimum or the maximum value if the actual product is greater than the maximum. Here is an example.

A B
1 Rate 20%
2 Maximum 75
3 Minimum 40
4
5 Gross Net
6 100 20
7 200 40
8 300 60
9 400 80

Column A rows 6 - 9 are being multiplied by cell B1 - the product is shown in cells B6-B9. I want the values in cells B6-B9 to return the product of the numbers that are being multiplied except if the product is less than the minimum (40 shown in cell B3), then the minimum value of 40 should be returned or if the product is greater than the maximum value (75 shown in cell B2), then the maximum value of 75 should be returned. The results should look like this:

A B
1 Rate 20%
2 Maximum 75
3 Minimum 40
4
5 Gross Net
6 100 40
7 200 40
8 300 60
9 400 75

Can anyone help with this? Thanks in advance!






EggHeadCafe - Software Developer Portal of Choice
WCF Workflow Services Using External Data Exchange
http://www.eggheadcafe.com/tutorials...vices-usi.aspx
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,722
Default Calculating a Formula Subject to a Maximum and Minimum Value

Formula in B6:

=MIN(B$2,MAX(B$3,A6*B$1))
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"Josh Thompson" wrote:

I am having trouble coming up with a correct formula and I am hoping that someone may be able to help. I am trying to multiply two numbers in two different cells, but have the product subject two a minimum amount that is located in another cell and a maximum amount located in another cell so that the formula returns either the actual product, or the minimum value if the actual product is less than the minimum or the maximum value if the actual product is greater than the maximum. Here is an example.

A B
1 Rate 20%
2 Maximum 75
3 Minimum 40
4
5 Gross Net
6 100 20
7 200 40
8 300 60
9 400 80

Column A rows 6 - 9 are being multiplied by cell B1 - the product is shown in cells B6-B9. I want the values in cells B6-B9 to return the product of the numbers that are being multiplied except if the product is less than the minimum (40 shown in cell B3), then the minimum value of 40 should be returned or if the product is greater than the maximum value (75 shown in cell B2), then the maximum value of 75 should be returned. The results should look like this:

A B
1 Rate 20%
2 Maximum 75
3 Minimum 40
4
5 Gross Net
6 100 40
7 200 40
8 300 60
9 400 75

Can anyone help with this? Thanks in advance!






EggHeadCafe - Software Developer Portal of Choice
WCF Workflow Services Using External Data Exchange
http://www.eggheadcafe.com/tutorials...vices-usi.aspx

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Calculating a Formula Subject to a Maximum and Minimum Value

Great! Thanks a bunch! One other question... What if I needed to make the returned value subject to the min or max only if the product is greater than 0? For example, if cell A10 contained a 0, then when A10 is multiplied by B2 the product would be 0. Under the current formula the minimum is returned. Can I have the formula set up so that the returned value is 0? This would need to happen only if the product is 0 - If the product is greater than 0 but less than the minimum, the minimum would need to be returned.

Also, I am not sure where to click yes - If you could point me in the right direction, I would be happy to do so.



Posted as a reply to:

Calculating a Formula Subject to a Maximum and Minimum Value

Formula in B6:

=MIN(B$2,MAX(B$3,A6*B$1))
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"Josh Thompson" wrote:

EggHeadCafe - Software Developer Portal of Choice
WCF Workflow Services Using External Data Exchange
http://www.eggheadcafe.com/tutorials...vices-usi.aspx
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
Formula for Minimum/Maximum LaDonna Brooks Excel Worksheet Functions 2 June 24th 09 05:57 AM
Formula with minimum & maximum values readystate Excel Worksheet Functions 5 May 19th 07 04:40 AM
maximum/minimum value in formula Tim G. Excel Discussion (Misc queries) 2 January 10th 07 10:38 AM
Formula for calculating a running balance up to a maximum limit kaw Excel Worksheet Functions 3 September 14th 06 07:10 PM
pivottable formula : maximum one field - minimum of another one seyhmus Excel Discussion (Misc queries) 1 February 24th 06 12:25 AM


All times are GMT +1. The time now is 05:54 AM.

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"