Cells.AutoFilter Field:=18, Criteria1:="0"
LR = ActiveSheet.Range("R" & Rows.Count).End(xlUp).Row
Range("R2:R" & LR).SpecialCells(xlCellTypeVisible).Select
Range("R2:R" & LR).Delete
Cells.AutoFilter
here is a sample that does that. Filters on column R
Code:Cells.AutoFilter Field:=18, Criteria1:="0" LR = ActiveSheet.Range("R" & Rows.Count).End(xlUp).Row Range("R2:R" & LR).SpecialCells(xlCellTypeVisible).Select Range("R2:R" & LR).Delete Cells.AutoFilter
Sub FilterMini()
Dim Lastrow As Long
Lastrow = Cells(Rows.Count, "R").End(xlUp).Row
With Range("R2:R" & Lastrow)
.AutoFilter Field:=1, Criteria1:="Dad", Operator:=xlFilterValues
.SpecialCells(xlCellTypeVisible).Rows.Delete
End With
ActiveSheet.AutoFilterMode = False
End Sub
This uses a filter for the selection and then deletes those rowsSo This code is a little greek to me, but tell me if I am on the right track with it. Am I to understand that this code basically begins selection of rows from the bottom to the top of the table? If so, that's brilliant.