How to return index of an array in a user defined function in excel? -


i have user-defined function (not mine, in plug-in) returns array of values in column a. have following (array) formula in column b, returns cells in column contain specified string:

=index($a$1:$a$256,small(if(isnumber(search($b$1,$a$1:$a$256)),row($a$1:$a$256)),row(2:2))) 

this uses row() function row(s) of matching elements. works fine.

however, clean sheet little, , following:

=index(udf(),small(if(isnumber(search($b$1,udf())),row(udf())),row(2:2))) 

youll notice have replaced array '$a$1:$a$256' returned array udf. seems break @ row(udf()) part. there similar function, return index of array, or 'row'?

note: rather not in vba, , cannot edit udf (it not mine).

edit:

ok have bit more information. if suggested in comments, , evaluate formula, evaluation returns first element of array. brought related, second question. how 1 udf? if familiar bloomberg, know when call bdh or bdp formula (not calling array formula), fills range values. how happen?! feel if know answer question, me understand happening in particular udf.


Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

jquery - javascript onscroll fade same class but with different div -