Untested but give this a try
Sub nahrada()
Dim FoundCell As Range
Dim LastCell As Range
Dim RangeToDelete As Range
Dim FirstAddr As String
Dim LastRow As Long
With Worksheets("List2")
For ptr = 1 To ActiveSheet.Cells(Rows.CountLarge, "F").End(xlUp).Row
LastRow = .Cells(Rows.CountLarge, 1).End(xlUp).Row
With .Range("J1:J" & LastRow)
Set LastCell = .Cells(.Cells.Count)
End With
Set FoundCell = .Range("J1:J" & LastRow).Find(What:=ActiveSheet.Cells(ptr, "F"), After:=LastCell)
If Not FoundCell Is Nothing Then
FirstAddr = FoundCell.Address
End If
Do Until FoundCell Is Nothing
If RangeToDelete Is Nothing Then
Set RangeToDelete = .Cells(FoundCell.Row, "A")
Else
Set RangeToDelete = Union(RangeToDelete, .Cells(FoundCell.Row, "A"))
End If
Set FoundCell = .Range("J1:J" & LastRow).FindNext(After:=FoundCell)
If FoundCell.Address = FirstAddr Then
Exit Do
End If
Loop
If Not RangeToDelete Is Nothing Then
RangeToDelete.EntireRow.Delete
End If
Set RangeToDelete = Nothing
Next
End With
End Sub
Bookmarks