Livin404
Well-known Member
- Joined
- Jan 7, 2019
- Messages
- 743
- Office Version
- 365
- 2019
- Platform
- Windows
I have the following VBA and it works nearly perfect. However, I also want the VBA to find 777 and remove it and the the row it belongs to just like it does for CHS. Lastly, is there a reason why CHS is not being removed from the fist row? Everything else is working as designed.
Thank you
Thank you
VBA Code:
Sub Delete_locals()
With ActiveSheet
.AutoFilterMode = False
With Range("B1", Range("B" & Rows.Count).End(xlUp))
.AutoFilter 1, "*CHS*"
On Error Resume Next
.Offset(1).SpecialCells(12).EntireRow.Delete
End With
.AutoFilterMode = False
End With
End Sub