Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
dan dan is offline
external usenet poster
 
Posts: 113
Default Still trying to delete...

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


  #2   Report Post  
Posted to microsoft.public.excel.programming
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



  #3   Report Post  
Posted to microsoft.public.excel.programming
dan dan is offline
external usenet poster
 
Posts: 113
Default Still trying to delete...

Thank you! but is deleting just the blank rows!?

Thanks again; I will see if I can find out why??

Dan
-----Original Message-----
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



.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default Still trying to delete...

If there were only 4 values to delete, I wouldn't use a macro.

I'd apply Data|filter|autofilter
filter that column to show the values to delete (one at at time)
then delete the visible rows
then filter by the next value, delete those visible rows,
etc.



Dan wrote:

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


--

Dave Peterson

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
delete the test values, but do not delete the formulas kathy Excel Discussion (Misc queries) 1 February 21st 07 07:03 PM
How to Delete a Range in Closed Workbook (to Replace Delete Query) [email protected] Excel Discussion (Misc queries) 1 March 8th 06 10:10 AM
How do i delete a macro in Excel 2003 when delete isn't highlight Abel Excel Discussion (Misc queries) 2 September 13th 05 04:09 AM
How to delete rows when List toolbar's "delete" isnt highlighted? Linda Excel Worksheet Functions 1 May 26th 05 08:39 PM


All times are GMT +1. The time now is 11:38 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"