View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Fred Smith[_4_] Fred Smith[_4_] is offline
external usenet poster
 
Posts: 2,389
Default Nested if function

After rereading your initial post, I think the following will do what you
want.

First, you need an array formula, which you create by using
Control-Shift-Enter, rather than just Enter. Second, do you want the minimum
value, or the maximum value? You say Min in your initial post, but used Max
in the formula. Why the discrepancy? Finally, your ranges have to be the
same size. If you're testing K7:K18, then your values range must be B7:B18,
not B7:B20.

Assuming you want the minimum, try the following:

=MIN(IF(K7:K18="TRUE",B7:B18,0))

Remember to commit with Ctrl-Shift-Enter.

Regards,
Fred.

"Steve M" wrote in message
...
I need the formula to look for "TRUE" in EACH row to determine whether or
not to use the figure in column B. This formula did not
work--=IF(K7:K18="TRUE",MAX(B7,B8,B9,B10,B11,B14,B15,B16 ,B17,B18,B19,B20)).
The cell returns #VALUE! when I try this formula. Note that some of the
cells K7 to K18 will contain the formula result "TRUE" and some "FALSE."
"Fred Smith" wrote in message
...
Something like:

=if(K1="TRUE",min(b1:b13),"what you want displayed when K is FALSE")

Regards,
Fred.

"Steve M" wrote in message
...
I want to return the minimum value of about 13 cells in a column (column
B). I only want to include values where the text in column K is TRUE
(based on a different IF formula from another cell).
TIA