Solved

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

Posted on 2011-03-24
3
803 Views
Last Modified: 2013-11-05
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
Comment
Question by:carilou
3 Comments
 
LVL 22

Accepted Solution

by:
rspahitz earned 250 total points
ID: 35207807
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
 
LVL 6

Assisted Solution

by:KnutsonBM
KnutsonBM earned 250 total points
ID: 35207830
vlookup is what you are looking for a i believe, see attached
with-vlookup.xls
0
 

Author Closing Comment

by:carilou
ID: 35208079
Thank you so much!  You were both extremely helpful!!
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article is the result of a quest to better understand Task Scheduler 2.0 and all the newer objects available in vbscript in this version over  the limited options we had scripting in Task Scheduler 1.0.  As I started my journey of knowledge I f…
Excel can be a tricky bit of software to get your head around. Whilst you’ll be able to eventually get to grips with the basic understanding of how to get by, there are a few Excel tips that not everybody will even know about let alone know how to d…
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question