Hi
I'm trying to filter using the below:
Sub Del_Rows()
Dim Countries As String
Set wk = ThisWorkbook
Set ABC = wk.Sheets("123")
Set Countries = Sheet1.Range?????
Application.ScreenUpdating = False
With ABC.UsedRange
.AutoFilter Field:=3, Criteria1:=Countries
.AutoFilter Field:=6, Criteria1:=">=50"
.Offset(1).SpecialCells(xlVisible).EntireRow.Delete
.AutoFilter
End With
Application.ScreenUpdating = True
End Sub
For field 3 I want to filter by a list of country codes which I have on my front sheet where the user has marked a y in the cell adjacent to each.
any ideas?
I'm trying to filter using the below:
Sub Del_Rows()
Dim Countries As String
Set wk = ThisWorkbook
Set ABC = wk.Sheets("123")
Set Countries = Sheet1.Range?????
Application.ScreenUpdating = False
With ABC.UsedRange
.AutoFilter Field:=3, Criteria1:=Countries
.AutoFilter Field:=6, Criteria1:=">=50"
.Offset(1).SpecialCells(xlVisible).EntireRow.Delete
.AutoFilter
End With
Application.ScreenUpdating = True
End Sub
For field 3 I want to filter by a list of country codes which I have on my front sheet where the user has marked a y in the cell adjacent to each.
any ideas?