Search : in
By :

EXCEL HELP combining info from2 sheets

Last answer on Jun 19, 2009 1:48:07 am BST Sassoon, on Jun 18, 2009 6:28:38 pm BST 
 Report this message to moderators

Hello,
Hello,
How can I match and combine records across two excel sheets. I have two excel sheets containing record information, about 6 columns for each record. I would like to be able to match records by part # and combine the columns for each record from each sheet. So each new record will include all available columns from both sheets for each specific record (each record is a row). Part # in both sheets is column A, while the rest of the columns have different information. The formula needs to check for each part# in column A sheet 1 and find the same part # in column A in sheet 2 and then combine the information. There are 500 records so it will need to be able to do this automatically for all records.
The combined records could be displayed in a new sheet # 3 of combined within sheet 1 or 2.
If possible please also explain how to implement the formula since I am not excel savvy.

P.S please don't send me to look at a previous post as I have read pages of them and I'm still blank....

Configuration: Windows Vista Internet Explorer 7.0

Best answers for « EXCEL HELP combining info from2 sheets » in :
How to convert Excel into PDF? ShowHow to convert Excel into PDF? Here is a small tips about how to convert your excel files into PDF for your presentation. Step 1 PDF995 is software that gets installed on your computer which enables you to print any sources of document to...
Basic Excel Formulas ShowBasic Excel Formulas Below are some basic formulas for Microsoft excel: Basic formula : ADDITION cell A1 to A10 = sum (A1: A10) AVERAGE cell A1 to A10 = average (A1: A10) MAXIMUM cell A1 to A10 = max (A1: A10) MINIMUM...
How to compare 2 excel sheet and combine uniq data? ShowHow to compare 2 excel sheet and combine uniq data? Issue Solution Note Issue I have 2 excel sheets , A and B. There are redundant data in both sheets as well as uniq. All i want is to combine both with no redundant records. (A+B...

1

 venkat1926, on Jun 19, 2009 1:48:07 am BST
  • +2

I assumed that there are no duplicates in column A of either sheet 1 or sheet2
the heading rows are in row1 in both the sheets.

Park your original file safely somewhere so that it can be retrieved
if there is a problem

try this macro and see sheet 3 and confirm whether this is what you want.

Sub test()

Dim c As Range, cfind As Range, x, dest As Range, cfind1 As Range
On Error Resume Next
Worksheets("sheet3").Cells.Clear
With Worksheets("sheet1")
.UsedRange.Copy Worksheets("sheet3").Range("a1")

For Each c In Range(.Range("a2"), .Range("a2").End(xlDown))
x = c.Value

    With Worksheets("sheet2")
    Set cfind = .Cells.Find(what:=x, lookat:=xlWhole)
    If cfind Is Nothing Then GoTo line1
    .Range(cfind.Offset(0, 1), cfind.End(xlToRight)).Copy
        With Worksheets("sheet3")
        Set cfind1 = .Cells.Find(what:=x, lookat:=xlWhole)
        If cfind1 Is Nothing Then GoTo line1
       cfind1.End(xlToRight).Offset(0, 1).PasteSpecial
        End With 'sheet3
     End With  'sheet2
line1:
 Next
 End With 'sheet1
    Application.CutCopyMode = False
End Sub

Reply to venkat1926