Quote:
Originally Posted by NoSparks
What you've pointed out in post #8 pretty much contradicts that, but here you go
Code:
Sub RowDoesNotContain()
Dim x As Long, ContainWord As String
'What phrase do you want to test for?
ContainWord = "Magic"
With Sheets("Sheet1") '<~~~ change as necessary
For x = .Cells(Rows.Count, "A").End(xlUp).Row To 1 Step -1
If Not Rows(x).Find(ContainWord) Is Nothing Then Rows(x).Delete
Next x
End With
End Sub
|
thanks nosparks, but this is removing the rows that contain the specified text instead of removing the rows which do not contain the specified text.
edit: i removed the word 'Not' in the code and now it works fine.
thanks logit and nosparks.