excel - Determining median values with nested IF and AND array formulas -


i'm trying create 2 similar array formulas:

one determine median value of cells in column (b), if there both corresponding blank values in column j, , there numeric values in column d. (d , j in separate sheets.)

the other formula same thing, except determine median cells in b corresponding cells in column j not blank.

i should note making sure enter them in command-shift-enter, since array formulas. however, it's coming out 0 both of them. i've tried long time , can't figure out why. i'm new excel formulas, please let me know if should clarify question.

first formula:

=median(if(   and('raw data'!$j$3:'raw data'!$j$999="", isnumber('raw data'!$d$3:'raw data'!$d$999)),   b$6:b$1002)) 

second formula:

=median(if(   and(not(isblank('raw data'!$j$3:'raw data'!$j$999)), isnumber('raw data'!$d$3:'raw data'!$d$999)),   b$6:b$1002)) 

array equivalent of and multiplication *:

=median(if(('raw data'!$j$3:$j$999="")*             isnumber('raw data'!$d$3:$d$999),             b$6:b$1002)        ) 

with array entry (ctrl+shift+enter).

for second formula:

=median(if(not(isblank('raw data'!$j$3:$j$999))*            isnumber('raw data'!$d$3:$d$999),            b$6:b$1002)        ) 

also array entry.


explanation why and not working.

what expect and({true,false,false},{true,true,false}) returns {true,false,false}.

however, and takes array of boolean values , returns single boolean value - indicates whether all values true or false.

so, and({true,false,false},{true,true,false}) returns false because not values true.

but, multiplication {true,false,false}*{true,true,false} works need - returns {true*true,false*true,false*false} = {true, false, false}


Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -