Array?

M

Mindie

I am trying to find out how I can do this. I have 3 sheets in my workbook.
On sheet one I am trying to compare one cell to other cells in sheet 2 and
the answers are in the next row under these cells. I want to display these
answers on another cell in sheet 3. For example: Sheet1!E5=C1 THEN DISPLAY
D1 as the answer to E5, or If Sheet1!E5=C2, then display D2 as the answer to
E5 and so on.
 
B

Bob Phillips

=INDEX(D:D,MATCH(Sheet1!E5,C:C,0))

--

HTH

RP
(remove nothere from the email address if mailing direct)
 
M

Mindie

I have tried doing this but I keep getting #N/A?

Bob Phillips said:
=INDEX(D:D,MATCH(Sheet1!E5,C:C,0))

--

HTH

RP
(remove nothere from the email address if mailing direct)
 
B

Bob Phillips

That suggests I may have got the data wrong way around.

The formula is saying, match the value in Sheet1 cell E5 against column C on
this worksheet, and when found, get the corresponding value from column D.
Is this how it should be?

--

HTH

RP
(remove nothere from the email address if mailing direct)
 
M

Mindie

No you were correct in the way that I told you, but the issue I am having
right now is if it doesn't find a match, I get #n/a, and I would prefer to
show blanks. How do I do that?
 
B

Bob Phillips

Okay, that's easy enough

=IF(ISNA(MATCH(Sheet1!E5,C:C,0)),"",INDEX(D:D,MATCH(Sheet1!E5,C:C,0)))


--

HTH

RP
(remove nothere from the email address if mailing direct)
 
M

Mindie

Thanks, that worked perfectly!

Bob Phillips said:
Okay, that's easy enough

=IF(ISNA(MATCH(Sheet1!E5,C:C,0)),"",INDEX(D:D,MATCH(Sheet1!E5,C:C,0)))


--

HTH

RP
(remove nothere from the email address if mailing direct)
 
Top