Help - Deleting Rows on Text Criteria
On Thu, 18 Aug 2005 22:09:29 -0500, rayd8
wrote:
I've created some code that imports a fixed width text file and formats
it into columns according to field length. Some of these rows begin
with "@1" and some begin with "@2". The client only wants the rows that
begin with "@1". No problem (so I thought), I'll just create a loop to
go through the rows and delete rows that contain "@2" in column A.
Except that I can't get it to work. Here is the code I'm using:
Just a thought, but wouldn't it be quicker to filter the whole sheet
to display the "@2" rows, (or preferably rows Not Equal to @1) and
then use the
Application.DisplayAlerts = False
Range("your_range").SpecialCells(xlCellTypeVisible ).Rows.Delete
then switch the filter off?
Rgds
__
Richard Buttrey
Grappenhall, Cheshire, UK
__________________________
|