0

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?

2
  • 1
    Consider using VLOOKUP() . Commented Jan 31, 2014 at 15:43
  • 5 seconds after I posted it, a spark appeared and it suggested vlookup LOL... Thanks :) Commented Jan 31, 2014 at 15:48

1 Answer 1

2

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.