aaaaa34
Board Regular
- Joined
- Feb 25, 2014
- Messages
- 62
hey guys,
I have a vba code to delete some rows along the match list
If it is written "#value!" in score column (7), code should delete that row.
But it gives error and not deleting.
Here is the code
Can you check the attached file and help me to fix the code please? File:https://jumpshare.com/v/jrNnaY5Yz5mqlQrx0HBJ
Thank you.
I have a vba code to delete some rows along the match list
If it is written "#value!" in score column (7), code should delete that row.
But it gives error and not deleting.
Here is the code
Code:
Sub delApple()
Dim r As Long, n As Long, U As Range
n = Cells(Rows.Count, 7).End(xlUp).Row
For r = 2 To n
If InStr(1, Cells(r, 7), "#value!") Then
If U Is Nothing Then
Set U = Cells(r, 7)
Else
Set U = Union(Cells(r, 7), U)
End If
End If
Next r
If Not U Is Nothing Then U.EntireRow.Delete
Set U = Nothing
End Sub
Thank you.