I have the following VBA to remove rows that contain a -v(any number) and -vlan*. The issue is that all rows that contain a -v3* are not getting removed
Sub test()
With ActiveSheet
.AutoFilterMode = False
With Range("a1", Range("a" & Rows.Count).End(xlUp))
.AutoFilter 1, "*-v1*"
.AutoFilter 1, "*-v2*"
.AutoFilter 1, "*-v3*"
.AutoFilter 1, "*-v4*"
.AutoFilter 1, "*-v5*"
.AutoFilter 1, "*-v6*"
.AutoFilter 1, "*-v7*"
.AutoFilter 1, "*-v8*"
.AutoFilter 1, "*-v9*"
.AutoFilter 1, "*-vlan*"
On Error Resume Next
.Offset(1).SpecialCells(12).EntireRow.Delete
End With
.AutoFilterMode = False
End With
End Sub
does anyone know as to why the -v3* are not removinig?
Sub test()
With ActiveSheet
.AutoFilterMode = False
With Range("a1", Range("a" & Rows.Count).End(xlUp))
.AutoFilter 1, "*-v1*"
.AutoFilter 1, "*-v2*"
.AutoFilter 1, "*-v3*"
.AutoFilter 1, "*-v4*"
.AutoFilter 1, "*-v5*"
.AutoFilter 1, "*-v6*"
.AutoFilter 1, "*-v7*"
.AutoFilter 1, "*-v8*"
.AutoFilter 1, "*-v9*"
.AutoFilter 1, "*-vlan*"
On Error Resume Next
.Offset(1).SpecialCells(12).EntireRow.Delete
End With
.AutoFilterMode = False
End With
End Sub
does anyone know as to why the -v3* are not removinig?