You might find this faster than looping
Sub DeleteRows()
Dim LastRow As Long
LastRow = Range("D" & Rows.Count).End(xlUp).Row
Range("K2").Resize(LastRow - 1, 1).Formula = "=IF(OR(ISNUMBER(SEARCH(" & Chr(34) & "ELF" & Chr(34) & ",D2)),ISNUMBER(SEARCH(" & Chr(34) & "OLEP" & Chr(34) & ",D2,1)))," & Chr(34) & "DELETE" & Chr(34) & ","""")"
With Columns("K:K")
.AutoFilter Field:=1, Criteria1:="<>"
Rows("2:" & LastRow).EntireRow.Delete
.AutoFilter
.Clear
End With
End Sub
Change Columns("K:K") & Range("K2") to suit a spare column in your sheet.
Bookmarks