View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
OZDOC1050[_3_] OZDOC1050[_3_] is offline
external usenet poster
 
Posts: 16
Default Still trying to delete...

Just one way it could be done, adjust to suit, presuming this runs down in
column A.
R
Pete

Sub NUMBERSPLEASE()
Application.ScreenUpdating = False
On Error Resume Next
Range("A65536").Select
Range(Selection, Selection.End(xlUp)).Select
ActiveCell.Offset(1, 0).Value = "END"
Range("A1").Select
Do Until ActiveCell.Value = "END"
If ActiveCell.Value = "" Or ActiveCell.Value = "node" Or _
ActiveCell.Value = "===" Or ActiveCell.Value = "name" Or _
ActiveCell.Value = "active" Then
ActiveCell.EntireRow.Delete
ActiveCell.Offset(-1, 0).Select
End If
ActiveCell.Offset(1, 0).Select
Loop
ActiveCell.ClearContents
Range("A1").Select
Application.ScreenUpdating = True
End Sub

--
(][ This Email has been scanned by Norton AntiVirus. ][)
"Dan" wrote in message
...
Hi again:

I have a csv file and I would like to delete all the rows
that are not starting in A1, with a number:

So I would like to keep:
87192
04321

and delete those that are blank or start, in A1 with:


node
===
name
active


THANK YOU,

Dan