Question

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?

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top