Copy a cell in the same row as a matched cell on a sheet2

Closed
Matt - 21 Jul 2016 à 10:15
Mazzaropi Posts 1983 Registration date Monday 16 August 2010 Status Contributor Last seen 24 May 2023 - 21 Jul 2016 à 11:46
Hey,

Let me try and explain this better.

I need to match A2 with Sheet2!A:A, but the value I need is a cell on Sheet2 in the same row as the match.

Let's say A2 matches Sheet2!A20, I need Sheet2!E20.

I thought Index Match would work:
=IFERROR(INDEX(Sheet1!E:E,MATCH(A2,Sheet1!A:A,0)),"X")

I'm missing something because this is putting values in cells that don't match.

Thanks!

2 responses

Mazzaropi Posts 1983 Registration date Monday 16 August 2010 Status Contributor Last seen 24 May 2023 147
21 Jul 2016 à 10:59
Matt, Good morning.

Your formula is correct but if you want put a formula at Sheet1 and get a Value from Sheet2, you need just change the destiny at your formula.

Try to use:

=IFERROR(INDEX(Sheet2!E:E,MATCH(A2,Sheet2!A:A,0)),"X")

Please, tell us if it worked for you.
I hope it helps.
--
Belo Horizonte, Brasil.
Marcílio Lobão
Thanks for the reply! Sorry, that was copied right from excel and I just forgot to change it. I'm actually working on Sheet 2 and pulling from Sheet 1.

=IFERROR(INDEX(Sheet2!E:E,MATCH(A2,Sheet2!A:A,0)),"X")

This formula is giving me values from Sheet2!E:E when there are no matches in Sheet2!A:A. Any ideas why or any alternatives?
Mazzaropi Posts 1983 Registration date Monday 16 August 2010 Status Contributor Last seen 24 May 2023 147
21 Jul 2016 à 11:46
Matt, Good afternoon.

"...This formula is giving me values from Sheet2!E:E when there are no matches in Sheet2!A:A..."

This is really very strange.
Your formula is correct and still you have improved the efficiency of the formula by placing the IFERROR Function.

So, if the problem is not in the formula, MUST be in the data.

If you prefer, save your file in a free site, www.speedyshare.com, and put the link here to download.

So it will be easier to help you conclusively.
--
Belo Horizonte, Brasil.
Marcílio Lobão