I cannot get the following code to do what I want
Sub VerwijderNtRelevant()
Dim waarde As String
Dim teller As Long
teller = 4
For teller = 4 To 517 Step 1
waarde = Cells(teller, 13).Value
If InStr(1, waarde, "ADH", vbTextCompare) = 0 Then
Cells(teller).EntireRow.Delete
End If
Next teller
End Sub
I want to go through rows 4 to 517 and see if column M (= column 13) contains the string 'ADH'. If it does, nothing should happen. If it does not, the row should be entirely deleted.
The value in column M could be something like 'BBR, ADH, HE' or 'KFE' or 'BH, HE'.
Any help will be greatly appreciated.
Bookmarks