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

Closed
Matt - Jul 21, 2016 at 10:15 AM
Mazzaropi Posts 1980 Registration date Monday August 16, 2010 Status Contributor Last seen December 22, 2022 - Jul 21, 2016 at 11:46 AM
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 replies

Mazzaropi Posts 1980 Registration date Monday August 16, 2010 Status Contributor Last seen December 22, 2022 146
Jul 21, 2016 at 10:59 AM
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
0
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?
0
Mazzaropi Posts 1980 Registration date Monday August 16, 2010 Status Contributor Last seen December 22, 2022 146
Jul 21, 2016 at 11:46 AM
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
0