Question : Remove data row

Hi Experts,

I need Experts help to rewrite the attached script. Need to remove the whole row if any of the content in column_C(system sheet) has “Cue” word.
Hope Experts could help me to revise the code.

Attached the workbook for Experts perusal.
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
Sub Cue2()
  
Dim rFind As Range

Application.ScreenUpdating = False

With Sheets("System").Columns(3)
    Set rFind = .Find(What:="Cue", LookAt:=xlWhole, MatchCase:=False, SearchFormat:=False)
    If Not rFind Is Nothing Then
        Do
            rFind.EntireRow.Delete
            Set rFind = .Find(What:="Cue", LookAt:=xlWhole, MatchCase:=False, SearchFormat:=False)
        Loop Until rFind Is Nothing
    End If
End With
     
Application.ScreenUpdating = True
     
End Sub
Attachments:
 
 

Answer : Remove data row

Change xlWhole argument to xlPart

Sub Cue2()
 
Dim rFind As Range

Application.ScreenUpdating = False

With Sheets("System").Columns(3)
    Set rFind = .Find(What:="Cue", LookAt:=xlPart, MatchCase:=False, SearchFormat:=False)
    If Not rFind Is Nothing Then
        Do
            rFind.EntireRow.Delete
            Set rFind = .Find(What:="Cue", LookAt:=xlPart, MatchCase:=False, SearchFormat:=False)
        Loop Until rFind Is Nothing
    End If
End With
     
Application.ScreenUpdating = True
     
End Sub
Random Solutions  
 
programming4us programming4us