I have a list with about 500 data entries and some of them have different text with the same number in a cell. I need to find all those rows with "00000" in it and delete them. I need to calculate the time when "test2" startet no working(18:23) and need to know how long it took that it worked again(18:30) and the error00000 message is messing my formulas up so i need to delete all rows with error00000 in it. the error messege is never the same but "000000" in it is always the same.
I don't know how to find it with VBA code because I only can find numbers alone in cells. The data entries can change per week so it should be with VBA.
I have some code but its online working when the number is alone in a cell and not in a sentence like Error message 00000
the text is always changing, the number stays the same.
My code for deleting rows with numbers alone in a cell
Private Sub CommandButton1_Click()
Dim lRow As Long
Dim iCntr As Long
lRow = 1000
For iCntr = lRow To 1 Step -1
If Cells(iCntr, 5).Value = "1008" Then
Rows(iCntr).Delete
End If
Next
End Sub
03.09.2015 18:30 test2 EXAMPLETEXT blablablalb error000002
03.09.2015 18:25 test2 EXAMPLETEXT blablablalb error000000
03.09.2015 18:23 test2 EXAMPLETEXT blablablalb error000002
03.09.2015 18:30 test1 EXAMPLETEXT blablablalb error000002
03.09.2015 18:25 test1 EXAMPLETEXT blablablalb error000000
03.09.2015 18:23 test1 EXAMPLETEXT blablablalb error000002