Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 989
Default Delete rows with specific text

Here is some code that is a little faster since it does not loop through
each
cell...



I tested that on 10,000 rows where every other one said "Total". You're
right, it's a lot faster than the other.

the way I do that is by passing a formula into a routine... (acknowledged,
my method would not work if there were not 1 free column at the far right of
the spreadsheet).

the del_rows subroutine accepts any formula... if it meets the condition, it
evaluates to "", if it doesn't, it evaluates to 1.

the rountine puts the formula in, copies it to the end of the data range,
sorts by the result, and deletes the ones that met the delete condition.

In the same test, that method took about half a second.
Reply
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
Delete rows with specific text David New Users to Excel 5 April 3rd 23 07:29 PM
Delete Rows Without Specific Text waggett Excel Worksheet Functions 6 October 6th 09 11:34 AM
select and delete specific rows Paulg Excel Discussion (Misc queries) 1 August 22nd 06 04:12 PM
Delete rows with specific leftmost value CLR Excel Programming 2 November 20th 04 02:02 AM
Macro to delete specific rows Steve Excel Programming 12 October 1st 04 11:50 PM


All times are GMT +1. The time now is 03:34 AM.

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"