LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Delete row


Tried another method and couldn't get it to work. Now trying the code
below. Have a sheet with 35K rows. Need to delete rows with "x" and
leave rows with "y" in column P. (I can use "1"'s or "2"'s in column P
or whatever since I'm conditioning column P.)

Dim cell As Range
Dim Arng As Range
Dim j As Long
Set Arng = Columns("P").SpecialCells(xlConstants, xlTextValues)
For j = Arng.Count To 1 Step -1
If LCase(Arng(j).Value) = "x" _
Then Arng(j).EntireRow.Delete
Next j

I've used this code elsewhere and it worked before. Code just
runs/loops forever, or is REAL slow.

Thanks.


--
Lift Off
------------------------------------------------------------------------
Lift Off's Profile: http://www.excelforum.com/member.php...fo&userid=8249
View this thread: http://www.excelforum.com/showthread...hreadid=507779

 
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
Macro to delete sheets and saves remaining file does not properly delete module pherrero Excel Programming 0 June 21st 05 05:16 PM
Macro to delete sheets and saves remaining file does not properly delete module pherrero Excel Programming 0 June 21st 05 05:11 PM
Macro to delete sheets and saves remaining file does not properly delete module bhawane Excel Programming 0 June 21st 05 04:54 PM
Macro to delete sheets and saves remaining file does not properly delete module pherrero Excel Programming 0 June 21st 05 04:38 PM
Delete every 3rd row, then delete rows 2-7, move info f/every 2nd row up one to the end and delete the row below Annette[_4_] Excel Programming 2 September 21st 04 02:40 PM


All times are GMT +1. The time now is 06:08 PM.

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

About Us

"It's about Microsoft Excel"