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: 4
Default Using SpecialCells().EntireRow.Delete on large worksheet - Very slow!

Hi all
I have a large worksheet (~60,000 rows) that includes mostly numeric
data and some text rows. I need to delete entire rows that have text
in the cell at column A.
I wrote the following code that selects column A (MyRange) and deletes
the entire row if a text value if found. it works fine, but extremely
slow (~10 min):

Sheets(My_Sheet).Select
MyRange.Select
MyRange.SpecialCells(xlCellTypeConstants,
xlTextValues).EntireRow.Delete

I suspected there is a memory issue working with such a large range at
once, so I tried looping every 100 rows. At first it worked realy
fast, but started to slow again until it finaly took the same amount
of time as before.
If this is a memory issue, is there a way to free the memory inside
the loop? If not, is the a more efficient way to do this?

Thanks,
Ilan
 
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
Need Help with ActiveCell.EntireRow.Delete Ayo Excel Discussion (Misc queries) 4 July 20th 08 11:07 AM
Need Help with ActiveCell.EntireRow.Delete Ayo Excel Discussion (Misc queries) 8 July 19th 08 04:45 PM
delete entirerow if date more than 12months old flow23 Excel Discussion (Misc queries) 1 May 25th 06 03:32 PM
Simple worksheet becomes large and slow Judy Excel Discussion (Misc queries) 3 May 10th 05 10:52 PM
entirerow.delete multiple text conditions Jocelyn[_3_] Excel Programming 3 February 9th 04 05:58 PM


All times are GMT +1. The time now is 03:08 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"