This should do it.
![]()
Sub Macro1() string1 = "value1" string2 = "value2" With Cells(1).CurrentRegion .AutoFilter 1, "<>*" & string1 & "*", xlAnd, "<>*" & string2 & "*" .Offset(1).SpecialCells(12).EntireRow.Delete .AutoFilter End With End Sub
This should do it.
![]()
Sub Macro1() string1 = "value1" string2 = "value2" With Cells(1).CurrentRegion .AutoFilter 1, "<>*" & string1 & "*", xlAnd, "<>*" & string2 & "*" .Offset(1).SpecialCells(12).EntireRow.Delete .AutoFilter End With End Sub
Last edited by bakerman2; 03-03-2018 at 08:37 PM.
Avoid using Select, Selection and Activate in your code. Use With ... End With instead.
You can show your appreciation for those that have helped you by clicking the * at the bottom left of any of their posts.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks