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: 73
Default 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
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
how to delete alternate rows in a spreadsheet? SI New Users to Excel 3 April 17th 08 10:19 AM
Macro to delete certain rows in a spreadsheet Gary Excel Programming 2 June 11th 07 05:03 PM
Macro/VBA to delete rows in Spreadsheet Colin Foster[_5_] Excel Programming 5 June 17th 06 12:47 PM
How do I delete both duplicate rows from a spreadsheet? natalia Excel Discussion (Misc queries) 3 April 29th 06 11:40 PM
Need a fast way to delete rows glenlee Excel Discussion (Misc queries) 1 September 23rd 05 03:33 AM


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

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"