find and delete row

V

vikram

Hi

Can we have a macro which finds something and deletes that entire ro
and that too like 3 or more criterias:

like if it finds "------" and "manual" and "blank" and so on

a macro with multiple criteria option, like all at one go

thank u so much frnd
 
F

Frank Kabel

Hi
try something like the following (looks in column A):
Sub delete_rows()
Dim RowNdx As Long
Dim LastRow As Long
Application.ScreenUpdating = False
LastRow = ActiveSheet.Cells(Rows.Count, "A").End(xlUp).row
For RowNdx = LastRow To 1 Step -1
with Cells(RowNdx, "A")
if .value = "" or .value = "------" _
or .value = "manual" then
Rows(RowNdx).Delete
End If
end with
Next RowNdx
Application.ScreenUpdating = True
End Sub
 
Top