Goodday hope someone can help
I have an array in Column H with 1300 rows, I need a Macro or a formula to do the following -If no 0 in array then delete all row that dont contain the 0. Sample below.Any help greatly appreciated. It must go through the whole column and delete. I have a macro but it does not delete all the cells.Thanx for any help
1, 17, 0, 40, 17 Qualifies it have a 0
1, 17, 8, 9, 40 >>>>>>>>>>>Must be deleted
1, 17, 14, 3, 40 >>>>>>>>>>>Must be deleted
1, 17, 17, 0, 40 >>>>>>>>>>>Qualifies
1, 17, 17, 40, 0
1, 17, 17, 40, 0
1, 17, 40, 9, 8 >>>>>>>>>>>>Must be deleted
1, 17, 40, 5, 12
1, 17, 40, 1, 16>>>>> Must be deleted
1, 0, 25, 9, 40 >>>>>>>>>>>Qualifies
1, 25, 3, 40, 6 >>>>>>>>>>>Must be deleted
1, 25, 5, 40, 4 >>>>>>>>>>>Must be deleted
Ricklou![]()
Option Explicit Sub DelSpecificRow() Dim r As Range Range("H1").Select ' you may change this to get your first data Range(ActiveCell, ActiveCell.End(xlDown)).Select For Each r In Selection If r.Value <> "*" & "," & " " & "0," & "*" Then r.EntireRow.Delete End If Next r End Sub
Bookmarks