Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Need Help with ActiveCell.EntireRow.Delete | Excel Discussion (Misc queries) | |||
Need Help with ActiveCell.EntireRow.Delete | Excel Discussion (Misc queries) | |||
delete entirerow if date more than 12months old | Excel Discussion (Misc queries) | |||
Simple worksheet becomes large and slow | Excel Discussion (Misc queries) | |||
entirerow.delete multiple text conditions | Excel Programming |