Hi AbiG,
Welcome to ExcelFox!!
Try this code.
Hit Alt+F11 > goto Insert > Module and paste this code there on the white pane. Alt+Q to close VBE and run kTest.
Code:
Option Explicit
Sub kTest()
Dim r As Range
Dim c As Range
Dim i As Long
Dim x, Flg As Boolean, Skip As Boolean
Const SearchKeysBeginsWith As String = "Fill List,Printed,DOB:,(et,Aller" '<< add more words separated by comma
Const SearchKeysContains As String = "Fill Cycle" '<< add more words separated by comma
Set r = Range("a1:a1500") '<< adjust to suit
Application.ScreenUpdating = 0
With r
x = Split(SearchKeysBeginsWith, ",")
1:
For i = 0 To UBound(x)
.AutoFilter 1, IIf(Flg, "*" & x(i) & "*", x(i) & "*")
On Error Resume Next
Set c = .Cells(1).Offset(1).Resize(.Rows.Count - 1, 1).SpecialCells(12)
On Error GoTo 0
If Not c Is Nothing Then
c.EntireRow.Delete
End If
Next
If Not Skip Then
x = Split(SearchKeysContains, ",")
Flg = True: Skip = True: GoTo 1
End If
.AutoFilter
End With
Application.ScreenUpdating = 1
End Sub
Bookmarks