Match value from column A to column A on 2nd sheet and then copy R

D

DanS

I am looking to do something like this

For value in Sheet1(Column A) match to value in Sheet2(Column A) and then
copy Entire Row containing match from Sheet2 only once After lastrow on
Sheet1 even if there are multiple cells with the same value on sheet1.
 
C

CurlyDave

Try this

Sub FindItemOtherSheet()

Dim sh As Worksheet
Dim f As Range
Dim s As String

Application.ScreenUpdating = False
s = InputBox("Enter Item to find", "Hello", Default)
Set f = Worksheets("Sheet2").Columns("A:A").Find(s,
LookIn:=xlValues)
If Not f Is Nothing Then
f.Rows("1:1").EntireRow.Copy Destination:=Worksheets
("Sheet1").Range("A65536").End(xlUp).Offset(1, 0)
Application.ScreenUpdating = True
Exit Sub
End If


End Sub
 
D

DanS

Thank You,

That works great but rather than using an InputBox I would like to use the
value in sheet1columnA as my search value and if it is a duplicate ignore it.

Dan
 

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