Magoosball
Board Regular
- Joined
- Jun 4, 2017
- Messages
- 70
- Office Version
- 365
Code:
Sub DeleteRow()
A = Worksheets("Sheet1").Cells(Rows.Count, 1).End(xlUp).Row
For i = A To 2 Step -1
If Worksheets("Sheet1").Cells(i, 6).Value Like "***" Then
Worksheets("Sheet1").Rows(i).Delete
End If
Next
End Sub
For some reason the code above deletes all rows.
I am only trying to delete rows where column F contains an asterisk symbol (*). Where am I going wrong?
Thank you in advance!