Sub Find_and_delete()
Dim rng As Range
Dim what As String
Dim strMsg As String
Dim lok4 As String
Dim count As Integer
count = 0
lok4 = Application.InputBox("What variable?")
Do
Set rng = ActiveSheet.UsedRange.Find(lok4)
If rng Is Nothing Then
Exit Do
Else: Rows(rng.Row).Delete
count = (count + 1)
End If
Loop
MsgBox "The number of deleted cells was " & count
End Sub
Thank you,
Ethan Castanon
Quantum Support – The Union of Finance & Technology
17732 Beach Blvd., Suite D
Huntington Beach, CA 92647
949-945-8665
Email: ethan@quantumsupport.biz
Web: http://www.quantumsupport.biz