Macro for fast deletion of rows that conatin certain data.
Try the below
Sub DeleteRows()
Dim lngRow As Long
For lngRow = Cells(Rows.Count, 2).End(xlUp).Row To 1 Step -1
If Range("B" & lngRow).Text = "6:00 AM" Then Rows(lngRow).Delete
Next
End Sub
If this post helps click Yes
---------------
Jacob Skaria
"PhilBennett" wrote:
I need a macro that deletes all rows in a worksheet in which a certain text
string is found in a cell in that row? e.g. If a cell in column "B" contains
a text string "6:00 AM", then delete the entire row.
|