Sub DeleteRowsBasedOnCriteria()
'Assumes the list has a heading.
With ActiveSheet
'If filters are not visible then turn them on
If .AutoFilterMode = False Then .Cells(1, 1).AutoFilter
'Set the filters in A1 to show only rows to delete
.AutoFilter Field:=1, Criteria1:="Delete"
'Delete all visible cells under the heading.
.Cells(1, 1).CurrentRegion.Offset(1, 0).SpecialCells _
(xlCellTypeVisible).EntireRow.Delete
'Remove filters
.AutoFilterMode = False
End With
End Sub
==================
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.