View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_5_] Bob Phillips[_5_] is offline
external usenet poster
 
Posts: 620
Default Using Index and Match functions to lookup data in another worksheet

Chris,

I got confused where the data is stored (is it in Matrix A2:A31, or on this
sheet D1:AF31), but if it's in D1:AF31, this will get the value you want

=INDEX($D$1:$AF$31,MATCH(A2,$D$1:$D31,0),MATCH(A3, $D$1:$AF$1,0))

I hope you can sort out the correct refernces

--

HTH

Bob Phillips

"Chris" wrote in message
om...
Good Afternoon to all:

I am in the process of creating a schedule to determine the distances
between ports this information will then help to determine work start
times and other relevant information. For example the data matrix
sheet will contain the various ports and distances in a matrix format.
The schedule sheet will contain information such as:

Port Distance
Cell (A2)Savannah
Cell (A3)Rio de Janiero

the distance cell (lets call it B2) will refer back to A2 and A3 and
then lookup the distances from the data matrix sheet. I was trying to
use the following function but had some challenges with it. Below is
an example:


=Index(Matrix!$A$2:$A$31,MATCH(A2,$D$1:$AF$31,TRUE ,0),MATCH(A3,$D$1:$AF$31,T
RUE,0))

I am trying to index on the port names in the Matrix and then look up
the appropriate distance based on the entries in cells A2 and A3.

Any assistance in figuring this out would be greatly appreciated!!

Kind Regards,