문제

I have a named array of 14 rows by 2 columns. The first has a string key (ie: Country), and the second an attribute (ie: Owner). I want to retrieve the Owner by supplying the Country.

I only know how to use =INDEX to retrieve values from named arrays, but that expects col/row numbers.

How might I achieve my requirement?

도움이 되었습니까?

해결책

For the sake of an answer.

Feed the INDEX function with a MATCH function to provide the requisite row number, along the lines:

=INDEX(B:B,MATCH(A2,A:A,0))

VLOOKUP will work but INDEX/MATCH is more powerful (see) so if you are already comfortable with INDEX it might be better to add MATCH to your arsenal rather than to bother with V/H LOOKUP.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top