I am working on an excel worksheet with multiple columns and roughly 6000 rows. Sheet1 will contain the main information.(the 6000 rows and columns to R). Sheet2 is my exceptions list I need to use for filtering/deleting these rows.
Right now this is what I am using and it only finds exact matches. I need this to find exceptions from sheet2 even if they are part of another word.
For example: when I run this it will find and delete every row that contains just the word hello. but not hello world or hello foo. I need this to delete the row with hello world and hello foo as well.
I am trying to set this up this way so i can simply add more items to my exceptions list and delete more rows as needed.
Sub CheckA()
Dim LR As Long, i As Long
With Sheets("IR Temp")
LR = .Range("A" & Rows.Count).End(xlUp).Row
For i = LR To 1 Step -1
If IsNumeric(Application.Match(.Range("A" & i).Value, Sheets("Exceptions").Columns("A"), 0)) Then .Rows(i).Delete
Next i
End With
End Sub
How can I make this less specific? I understand it is working how it is supposed to and is finding the exact match but I need it to find and delete the row if that value is found with any combinations of other characters with it.