excel - How to return multiple values using index/match? -


i have below simple table:

a   1 b   2 c   2 d   1 

using index/match formula, have set looks @ 1 row @ time.

however, when drag formula down , ask return second column 2. receive n/a @ top , bottom of lookup.

is there way me ask skip when there na or return multiple rows?

here code:

=index(b2,match(1,c2)) 

which returns:

a   1       b   2       #n/a c   2       #n/a d   1       d 

i return:

a   1       b   2       d c   2        d   1        

so skiiping rows there no match.

the easiest way have skip value na either put if statement

=if(a1 = "na","",index(match)) 

or if na because not finding match

=iferror(index(match),"") 

one of 2 should it. if not please post code.


Comments

Popular posts from this blog

Fail to load namespace Spring Security http://www.springframework.org/security/tags -

sql - MySQL query optimization using coalesce -

unity3d - Unity local avoidance in user created world -