delete row if text not in specific format
Try this:
Sub CleanUp()
Dim n As Long, i As Long, s As String
n = Cells(Rows.Count, "B").End(xlUp).Row
s = "00.000000.0000000.00.000.0000.0000"
For i = n To 1 Step -1
With Cells(i, "B")
If .NumberFormat < s Then
.EntireRow.Delete
End If
End With
Next
End Sub
--
Gary''s Student - gsnu200860
"Abdul" wrote:
Hi,
I have data in my column B
i want to delete all rows which are not in the specific format
00.000000.0000000.00.000.0000.0000
(zeros with any number)
thanks
|