• Status: Solved
• Priority: Medium
• Security: Public
• Views: 828

# Excel 2007 Compare two Worksheets for Common Data and have Excel copy and paste info from one to the other

I have an Excel file with two worksheets that contain some common data but not the same number of rows and not necessarily in the same order.  I need to match info from the two sheets and copy info from one to the other.  One of the worksheet has 3003 rows and the other has 2565 rows so I really don’t want to do this manually.  How can I have Excel check two worksheets for common data, and then copy information from one of the sheets to the other? I am working in Excel 2007.  Here is the information on the two sheets and on what I actually need to do:

Sheet one
Column A contains Part Numbers
Column B is Blank
Column C is Blank
Column D is Blank
Column E is Blank

Sheet two
Column A contains Part Numbers
Column B contains Manufacturers
Column C contains Cross Reference Info
Column D contains Manufacturers
Column E contains Cross Reference Info

I need excel to check Column A of Sheet one against Column A of Sheet two; When it finds common data (the same part number), I need it to copy the information from columns B,C,D,E of Sheet two and paste it into columns B,C,D,E of Sheet one.

Because the information in the real file is confidential, I have created a sample file that doesn't show the actual data.  Can anyone help me with a formula or Macro that will do this?  I have very little time to get this done and it’s urgent for my company.
Example-for-Experts-Exchange.xlsx
0
carilou
2 Solutions

Commented:
this is a job for vlookup:

cell B1 formula =VLOOKUP(A1, Sheet2!A:E, 2, FALSE)
cell C1 formula =VLOOKUP(A1, Sheet2!A:E, 3, FALSE)
cell D1 formula =VLOOKUP(A1, Sheet2!A:E, 4, FALSE)
cell E1 formula =VLOOKUP(A1, Sheet2!A:E, 5, FALSE)

Then copy the formulas down
0

Commented:
vlookup is what you are looking for a i believe, see attached
with-vlookup.xls
0

Author Commented:
Thank you so much!  You were both extremely helpful!!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.