View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
babs babs is offline
external usenet poster
 
Posts: 38
Default Code to find the max value for a cell while looking at other cells

I have a sheet that does numerous calculations that all hinge off of one cell
(L9). Currently, after I enter in the test data, I manually change the
number in L9 until I get the maximum value in the production field (R13).
While changing the value in L9, I have to pay attention to the values in
cells M10 and N10 to make sure they aren't 100, and that cells L13 thru P13
aren't 100 or <0.
How can I code a button or macro to run a range of values for L9 to find the
max value for R13 where M10 and N10 are <100 and cells L13 thru P13 are <100
and 0?
Thx in adv.