display unique data into third sheet

S

Sri

Hi..

I have data in 2 sheets which i want it to be displayed in the third sheet.
Please suggest me how to proceed with this...

------**------

Example :
Sheet 1: Sheet 2 :

No Name1 No Name2
1 abc 1 efg
2 eds 2 xyz
4 def 3 aaa
5 dss 6 ddd

The Result should be :
Sheet 3 :
No Name1 Name2
1 abc efg
2 eds xyz
3 aaa
4 def
5 dss
6 ddd

-------**--------
 
D

Don Guillett

One way, using sheet names

Sub dosheets()
Columns("b:c").ClearContents
For i = 1 To 12
On Error Resume Next
With Sheets("sheet1")
Set x = .Columns("a").Find(i, LookIn:=xlValues)
If Not x Is Nothing Then Cells(i + 1, "b") = .Cells(x.Row, "b")
End With

With Sheets("sheet2")
Set x = .Columns("a").Find(i, LookIn:=xlValues)
If Not x Is Nothing Then Cells(i + 1, "c") = .Cells(x.Row, "b")
End With
Next i
End Sub
 

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