Hi,
I am trying to run something that will remove the entire row if a series of letters are present.
I am using the below code. It works, but I need to add in around another 25 letter combinations (i.e at the moment it removes EZY, but I also need to remove EX, EFT etc etc.)
Can anyone help??
Sub DeleteRows()
Dim c As Range
Dim SrchRng
Set SrchRng = ActiveSheet.Range("B1", ActiveSheet.Range("B65536").End(xlUp))
Do
Set c = SrchRng.Find("EZY", LookIn:=xlValues)
If Not c Is Nothing Then c.EntireRow.Delete
Loop While Not c Is Nothing
End Sub
I am trying to run something that will remove the entire row if a series of letters are present.
I am using the below code. It works, but I need to add in around another 25 letter combinations (i.e at the moment it removes EZY, but I also need to remove EX, EFT etc etc.)
Can anyone help??
Sub DeleteRows()
Dim c As Range
Dim SrchRng
Set SrchRng = ActiveSheet.Range("B1", ActiveSheet.Range("B65536").End(xlUp))
Do
Set c = SrchRng.Find("EZY", LookIn:=xlValues)
If Not c Is Nothing Then c.EntireRow.Delete
Loop While Not c Is Nothing
End Sub