tonyvee1973
IS-IT--Management
Hi
Trying to remove entire rows in excel2010 if row E contains 11111.
Tried the script below as asks for the number but doesnt seem to ork.
Any ideas as to why this would be?
Thanks
Sub DeleteRows()
Dim c As Range
Dim SrchRng As Range
Dim SrchStr As String
Set SrchRng = ActiveSheet.Range("E1", ActiveSheet.Range("E45511").End(xlUp))
SrchStr = InputBox("Please Enter A Search String")
Do
Set c = SrchRng.Find(SrchStr, LookIn:=xlValues)
If Not c Is Nothing Then c.EntireRow.Delete
Loop While Not c Is Nothing
End Sub
Trying to remove entire rows in excel2010 if row E contains 11111.
Tried the script below as asks for the number but doesnt seem to ork.
Any ideas as to why this would be?
Thanks
Sub DeleteRows()
Dim c As Range
Dim SrchRng As Range
Dim SrchStr As String
Set SrchRng = ActiveSheet.Range("E1", ActiveSheet.Range("E45511").End(xlUp))
SrchStr = InputBox("Please Enter A Search String")
Do
Set c = SrchRng.Find(SrchStr, LookIn:=xlValues)
If Not c Is Nothing Then c.EntireRow.Delete
Loop While Not c Is Nothing
End Sub