Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Fast Way to Delete Rows from Big Spreadsheet (Using VBA)
Excel 2003, big spreadsheet, ~20000 rows, Col. B contains text values like
"1000", "1070", and "1120". Users sometimes want to quickly delete all the rows except those with one specific value in that Column. I've tried a couple approaches and run into (different) grief in each case. With a "For each row in used range" looping solution, it runs very slowly with that many rows. With a not-equal-to Autofilter, then deleting all result rows, it's much faster but doesn't always filter correctly with Criterion:="<1000" for some reason, haven't been able to figure out why. (Clarification: it hiccups no matter what value is specified, not just 1000.) When it works it's just what I want, but the next time with no apparent rhyme or reason it'll leave in the specified value, and poof!, the user winds up with a completely blank spreadsheet. Any thoughts? In particular, is there any way BESIDES these two that would run really fast? I'm constantly finding out about cool built-ins in Excel that I wasn't aware of, so I'm hoping there's one for this situation. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
how to delete alternate rows in a spreadsheet? | New Users to Excel | |||
Macro to delete certain rows in a spreadsheet | Excel Programming | |||
Macro/VBA to delete rows in Spreadsheet | Excel Programming | |||
How do I delete both duplicate rows from a spreadsheet? | Excel Discussion (Misc queries) | |||
Need a fast way to delete rows | Excel Discussion (Misc queries) |