View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Biff
 
Posts: n/a
Default How do I lookup data with two comparison values?

Does your formula change given this information?

The same basic structure still applies, however, you'd have to include the
path to the source file:

=INDEX('[File B.xls]Sheet1'!$C$2:$C$11,MATCH(A2&B2,'[File
B.xls]Sheet1'!$A$2:$A$11&'[File B.xls]Sheet1'!$B$2:$B$11,0))

The best way to do this is to have both files open as you write the formula
and use your mouse to point to the references. That way Excel will "plug in"
the path for you.

Biff

"Tiziano" wrote in message
...
Thanks, Biff.
Yes, I mean two separate Excel files with "spreadsheet A" and "spreadsheet
B".
Does your formula change given this information? (I am not much of an
Excel
expert...)
Thanks again.
--
tb

"Biff" wrote in message
...
Hi!

When you say "spreadsheetA" and "spreadsheetB", do you mean separate

files?

Here's how to do it using 2 worksheets in the same workbook.

In sheet1 C2 enter any one of these formulas as an array using the key

combo
of CTRL,SHIFT,ENTER:

=INDEX(Sheet2!C2:C11,MATCH(1,(Sheet2!A2:A11=A2)*(S heet2!B2:B11=B2),0))

=INDEX(Sheet2!C2:C11,MATCH(A2&B2,Sheet2!A2:A11&She et2!B2:B11,0))

=INDEX(Sheet2!C2:C11,MATCH(A2&"@"&B2,Sheet2!A2:A11 &"@"&Sheet2!B2:B11,0))

You might be able to use a much less complex formula depending on the the
data type you're trying to return but since you didn't include those
details.................we're left to guess!

Biff

"Tiziano" wrote in message
...
I would like to insert a function in spreadsheet A that looks up data in
spreadsheet B based on _two_ comparison values.
The two comparison values in spreadsheet A would always be in the same

row
and the corresponding match in spreadsheet B would also have to be in

the
same row.
For instance, if the comparison values in cells A2 and B2 of spreasheet

A
match with the comparison values in cells A30:B30 of spreadsheet B,
then
show the value that is in column C30 of spreasheet B.
I sure hope I was clear enough... Any help is appreciated!!
--
tb