#1   Report Post  
Johannes
 
Posts: n/a
Default Lookup in Matrix

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?


  #2   Report Post  
Leo Heuser
 
Posts: n/a
Default

Hello Johannes

One way:

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

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

--
Best Regards
Leo Heuser

Followup to newsgroup only please.

"Johannes" skrev i en meddelelse
...
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?




  #3   Report Post  
Andy Wiggins
 
Posts: n/a
Default

This file might be a help:
http://www.bygsoftware.com/examples/.../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/fun...sumproduct.htm


--
Regards
-
Andy Wiggins FCCA
www.BygSoftware.com
Excel, Access and VBA Consultancy


"Johannes" wrote in message
...
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?




  #4   Report Post  
Johannes
 
Posts: n/a
Default

Cheers, works perfectly
"Leo Heuser" schreef in bericht
...
Hello Johannes

One way:

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

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

--
Best Regards
Leo Heuser

Followup to newsgroup only please.

"Johannes" skrev i en meddelelse
...
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?






  #5   Report Post  
Johannes
 
Posts: n/a
Default

Guess the VBA solution is the prettiest. Kind of sad these things are not
standard functions...

Thanks,

Johannes
"Andy Wiggins" o m schreef in bericht
...
This file might be a help:
http://www.bygsoftware.com/examples/.../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/fun...sumproduct.htm


--
Regards
-
Andy Wiggins FCCA
www.BygSoftware.com
Excel, Access and VBA Consultancy


"Johannes" wrote in message
...
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?








  #6   Report Post  
Leo Heuser
 
Posts: n/a
Default

You're welcome and thanks for the feedback :-)

LeoH


"Johannes" skrev i en meddelelse
...
Cheers, works perfectly



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Matrix Query Part II - lookup value Krista F Excel Worksheet Functions 1 April 6th 05 02:18 PM
Lookup Function Problem seve Excel Discussion (Misc queries) 9 February 28th 05 02:46 AM
Lookup function w/Text and Year Josh O. Excel Worksheet Functions 1 February 12th 05 11:27 PM
Finding Values in a "Matrix" Diane Alsing Excel Discussion (Misc queries) 8 December 31st 04 08:21 PM
double lookup, nest, or macro? Josef.angel Excel Worksheet Functions 1 October 29th 04 09:50 AM


All times are GMT +1. The time now is 12:38 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"