D
Dominique Feteau
I found this macro to delete a row that contained the word "dividend". How
can I change it so it will delete any rows that have "0" in Column Q. I
also dont want to have this as its own macro, but to insert it into another
macro I created already. How would I do that?
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
can I change it so it will delete any rows that have "0" in Column Q. I
also dont want to have this as its own macro, but to insert it into another
macro I created already. How would I do that?
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