Sub MyDeleteMacro()
Dim str As String
Dim lr1 As Long
Dim lr2 As Long
Dim rng As Range
' Prompt user what value to look for and delete
str = InputBox("What string would you like to look for and delete those rows?")
' Find last row with data in column A
lr1 = Cells(Rows.Count, "A").End(xlUp).Row
' Create range to filter
Set rng = Range("A1:B" & lr1)
' Filter range
'rng.AutoFilter
rng.AutoFilter Field:=1, Criteria1:="=*" & str & "*" _
, Operator:=xlAnd
' Find last row in column A with data after filter
lr2 = Cells(Rows.Count, "A").End(xlUp).Row
' Exit sub if no data to delete data (only header visible)
If lr2 = 1 Then Exit Sub
' Delete unhidden data
Application.DisplayAlerts = False
ActiveSheet.UsedRange.Offset(1, 0).Resize(ActiveSheet.UsedRange.Rows.Count - 1).Rows.Delete
Application.DisplayAlerts = True
' Remove filter
rng.AutoFilter
End Sub