I am trying to modify some code I found in another post to filter a list and then delete certain rows based on values in a range from a different worksheet instead of the current sheet. Here is the original code from the other post:
Sub Filter_Delete() Dim lrow As Long lrow = Cells(Rows.Count, 2).End(xlUp).Row With Sheet1 .Range("B5:B" & lrow).AdvancedFilter Action:=xlFilterInPlace, CriteriaRange:= _ .Range("K1:K2"), Unique:= False .Range("B6:B" & lrow).SpecialCells(xlCellTypeVisible).EntireRow.Delete .ShowAllData End With End Sub
As I understand it the line that specifies the range containing the criteria to be used for deleting the rows is:
so I would like to change it to something like:
Any help is much appreciated!
Here a link to the original post: (http://www.ozgrid.com/forum/sh…ete+rows+based+criteriato)