Lookup in Matrix

  • Thread starter Thread starter Johannes
  • Start date Start date
J

Johannes

Hello all,

How can I look up a value in a matrix. First column has countries, first row
has years. Am looking for value of specific country in specific year.
Thought about combinations of lookup and matches, but that does not make it
any prettier. Any suggestions?

Any suggestions?
 
Hello Johannes

One way:

=INDEX(C2:I9,MATCH("Country",B2:B9,0),MATCH(Year,C1:I1,0))

Data in C2:I9, countries in B2:B9 and years in C1:i1
 
This file might be a help:
http://www.bygsoftware.com/examples/zipfiles/xindexvba.zip
It's in the "Excel for Lotus 123 Users" section on page:
http://www.bygsoftware.com/examples/examples.htm

In Excel there is no direct equivalent for Lotus 123's XINDEX function. This
workbook shows two Excel formula constructions that achieve the same result.

The first example uses two additional inputs. It uses the Excel functions:
INDEX and MATCH The second example uses the same inputs as the Lotus XINDEX
function. It uses the Excel functions: INDEX, MATCH and OFFSET.

There are also two additional pieces of VBA showing how to use this in code
and capture an error condition.

The code is open and commented.

There is also an alternative construction using SUMPRODUCT at:
http://www.bygsoftware.com/Excel/functions/sumproduct.htm


--
Regards
-
Andy Wiggins FCCA
www.BygSoftware.com
Excel, Access and VBA Consultancy
 
Cheers, works perfectly
Leo Heuser said:
Hello Johannes

One way:

=INDEX(C2:I9,MATCH("Country",B2:B9,0),MATCH(Year,C1:I1,0))

Data in C2:I9, countries in B2:B9 and years in C1:i1

--
Best Regards
Leo Heuser

Followup to newsgroup only please.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top