imimin
Active Member
- Joined
- May 9, 2006
- Messages
- 404
Hello!
I have the following macro that will 'examine' column A and delete any row that contains "-".
***What I need for it to do is to delete rows that DO NOT contain the hythen ("-") in column A. Can someone please help me re-write this?
Thank you!
I have the following macro that will 'examine' column A and delete any row that contains "-".
***What I need for it to do is to delete rows that DO NOT contain the hythen ("-") in column A. Can someone please help me re-write this?
Code:
Sub delrowsB()
Dim i As Long
For i = Cells(Rows.Count, "A").End(xlUp).Row To 1 Step -1
'If InStr(Cells(i, "A").Text, "Pc.") Or InStr(Cells(i, "A").Text, "Total") Or InStr(Cells(i, "A").Text, "Delivery") Then
If InStr(Cells(i, "A").Text, "-") Then
Cells(i, "A").EntireRow.Delete
End If
Next i
End Sub
Thank you!