Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

What formula can I use to match and insert data from one sheet to another?

I have 2 sheets in Excel with two different sets of data but a shared column. I’d like to combine the all the data into 1 sheet, but despite my Googling I’m not sure how to achieve this.

I’ve tried VLOOKUP() but with no results.

EG in Sheet 1 I have:

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

=VLOOKUP(A1,Sheet2!B1:B600,1,FALSE)

But it always returns #NAME? (new to Excel, don’t know what this means).

Would anyone know how I could achieve this?

My data looks like:

Sheet 1

Name Email
Joe joe@somewhere.com
Jane jane@somewhere.com
Tim tim@somewhere.com
Lisa lisa@somewhere.com

Sheet 2

ID Email
8842 lisa@somewhere.com
3323 joe@somewhere.com
5553 jane@somewhere.com

Desired outcome

Name Email ID
Joe joe@somewhere.com 3323
Jane jane@somewhere.com 5553
Tim tim@somewhere.com
Lisa lisa@somewhere.com 8842

>Solution :

You may want to take a look at the VLookup documentation to see that it is not a good fit for your requirement. Vlookup looks up the lookup value in the 1st column of a range, then returns the value from the specified column. Your formula looks for a text like "Joe" in a column with ID values, but you really want to look up the email address and return the column to the left of that. Vlookup cannot do that.

If you have Office 365, you can use XLookup() instead, like this in Sheet 1:

=xlookup(B1,Sheet2!$B$1:$B$600,Sheet2!$A$1:$A$600,"not found")

in words: use the email in B1, find that email in column B on Sheet 2 and return the value from column A for the found email.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading