View Single Post
  #2   Report Post  
Aladin Akyurek
 
Posts: n/a
Default

{=MEDIAN(IF($A$1:$A$7="a",$B$1:$B$7))}

Yours creates 0 values for non-a's, due to the trailing comma, the above
FALSE values, which MEDIAN ignore.

Henrik wrote:
Hi,

Is it possible to submit the MEDIAN() function as an array (ctrl + shift +
enter)?

I.e., I would like to submit a function similar to this SUM() function:
{=SUM(IF(("a"=$A$1:$A$7),$B$1:$B$7,))}

However, when I submit

{=MEDIAN(IF(("a"=$A$1:$A$7),$B$1:$B$7,))}

it does not give me the intended result.


Your help is much appreciated.

Henrik


--

[1] The SumProduct function should implicitly coerce the truth values to
their Excel numeric equivalents.
[2] The lookup functions should have an optional argument for the return
value, defaulting to #N/A in its absence.