Auto Delete a Row!!!!!!

  • Thread starter Thread starter Pivotrend
  • Start date Start date
P

Pivotrend

is it Possible to make Excel Auto Delete a row Of Cells If One cell i
this Row Contain a Word like "Dividend"
 
one way:

Public Sub DeleteRowsWithWord()
Const sWORD As String = "Dividend"
Dim found As Range

Application.ScreenUpdating = False
Set found = ActiveSheet.Cells.Find( _
What:=sWORD, _
LookIn:=xlValues, _
LookAt:=xlPart, _
MatchCase:=False)
If Not found Is Nothing Then
Do
found.EntireRow.Delete
Set found = ActiveSheet.Cells.FindNext
Loop Until found Is Nothing
End If
Application.ScreenUpdating = True
End Sub
 
Back
Top