I want to delete an entire row if the cell starts with the text "Joe Smith" or "Jim Bob". This is the code I have from another question but need to modify:
Sub SimpleDeletingMechanism()
Dim c As Range
' loop through all cells in range A1:A + last userd Row in column A
For Each c In Range("A1:A" & Range("A" & Rows.Count).End(xlUp).Row)
' when Joe Smith is found in cell's content
If InStr(1, c.Text, "Joe Smith", vbTextCompare) > 0 Then
' delete that row
' when Jim Bob is found in cell's content
ElseIf InStr(1, c, "Jim Bob", vbTextCompare) > 0 Then
' delete that row
End If
Next
End Sub
Can anyone help me fill in the gap for deleting the row if one of the names is found please?