.
Here is a macro method :
Code:
Option Explicit
Sub CopyYes()
Dim c As Range
Dim j As Integer
Dim Source As Worksheet
Dim sTarget As Worksheet
' Change worksheet designations as needed
Set Source = ActiveWorkbook.Worksheets("Sheet2")
Set sTarget = ActiveWorkbook.Worksheets("Sheet1")
sTarget.Range("A3:B1000").Value = ""
Application.ScreenUpdating = False
j = 3 ' Start copying to row 1 in target sheet
For Each c In Source.Range("A2:A1000") ' Do 1000 rows
If c = sTarget.Range("A2").Value Then
Source.Rows(c.Row).Copy sTarget.Rows(j)
j = j + 1
End If
Next c
Application.ScreenUpdating = True
End Sub
Sub clrall()
Dim sTarget As Worksheet
Application.ScreenUpdating = False
Set sTarget = ActiveWorkbook.Worksheets("Sheet1")
sTarget.Range("A3:B1000").Value = ""
Application.ScreenUpdating = True
End Sub