Auto Delete a Row!!!!!!

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"
 
J

JE McGimpsey

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top