Hi,
I have this coding (which I've modified for my own purpose) and I wanted to add more words i.e. current Account (Vm) and Current account (VI). I've gone down the road of filtering then deleting but it just looks........messy ! Is there a way of adding these 2 current Account (Vm) and Current account (VI) into the coding.
Many Thanks
Sub FindAndRemove()
Dim i As Long
Dim j As Long
Dim pickWord As Variant
Dim pickAnother As Variant
pickWord = "margin"
pickAnother = "standard class"
For i = 2 To Range("B" & Rows.Count).End(xlUp).Row
Set w = Range("B" & i).Find(pickWord, LookIn:=xlValues)
Set y = Range("B" & i).Find(pickAnother, LookIn:=xlValues)
If w Is Nothing And y Is Nothing Then
Rows(i).EntireRow.Delete
If Range("B" & i) = "" Then Exit Sub
i = i - 1
End If
Next i
End Sub
I have this coding (which I've modified for my own purpose) and I wanted to add more words i.e. current Account (Vm) and Current account (VI). I've gone down the road of filtering then deleting but it just looks........messy ! Is there a way of adding these 2 current Account (Vm) and Current account (VI) into the coding.
Many Thanks
Sub FindAndRemove()
Dim i As Long
Dim j As Long
Dim pickWord As Variant
Dim pickAnother As Variant
pickWord = "margin"
pickAnother = "standard class"
For i = 2 To Range("B" & Rows.Count).End(xlUp).Row
Set w = Range("B" & i).Find(pickWord, LookIn:=xlValues)
Set y = Range("B" & i).Find(pickAnother, LookIn:=xlValues)
If w Is Nothing And y Is Nothing Then
Rows(i).EntireRow.Delete
If Range("B" & i) = "" Then Exit Sub
i = i - 1
End If
Next i
End Sub