Option
Explicit
Sub
Test()
Dim
wks1
As
Excel.Worksheet
Dim
wks2
As
Excel.Worksheet
Dim
rngResult
As
Excel.Range
Dim
i
As
Long
Set
wks1 = ActiveWorkbook.Worksheets(
"Sheet1"
)
Set
wks2 = ActiveWorkbook.Worksheets(
"Sheet2"
)
For
i = 1
To
wks1.Cells(wks1.Rows.Count, 1).
End
(xlUp).Row
If
wks1.Cells(i, 1).Text <>
""
Then
With
wks2.Columns(3)
Set
rngResult = .Find(What:=wks1.Cells(i, 1).Text, _
LookIn:=xlValues, _
LookAt:=xlWhole)
Do
Until
rngResult
Is
Nothing
rngResult.EntireRow.Delete
Set
rngResult = .FindNext()
Loop
End
With
End
If
Next
End
Sub