Copying related values

M

mlewanfr

I can do the following with a macro, but is there any way to do it with
a formula?

On Sheet1, column A contains six digit numbers, like 123456, 314258,
and so on.
On Sheet2, column A contains the same kind of numbers, but not in the
same order, and not necessarily exactly the same numbers.

Those columns need to be matched in the following way:

When row x of Sheet2 has the same A value as row y of Sheet1, then the
value of Sheet2!Bx shall be copied to Sheet1!Cy.

In other words, the value of the second column of Sheet2 shall go to
the third column of Sheet1.

Non matching rows can be ignored.

Thanks for any kind of help
Magnus
 
N

Niek Otten

Hi Magnus,

=IF(ISNA(VLOOKUP(A1,Sheet2!$A$1:$B$100,2,FALSE)),"",VLOOKUP(A1,Sheet2!$A$1:$B$100,2,FALSE))
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top