How do I delete a row from a spreadsheet if criteria is not met i.

W

wonderboy55

In a spreadsheet, a column has 30 minutes or 60 minutes. Is there a way to
delete the entire row if the minutes <> 30?
 
B

Bob Phillips

Need VBA for that


Dim iLastRow As Long
Dim i As Long

iLastRow = Cells(Rows.Count, "A").End(xlUp).Row
For i = iLastRow To 1 Step -1
If Cells(i, "A").Text = "00:30" Or Cells(i, "A").Text = "01:00" Then
Rows(i).Delete
End If
Next i
 
Top