View Single Post
  #10   Report Post  
Posted to microsoft.public.excel.programming
Steph[_3_] Steph[_3_] is offline
external usenet poster
 
Posts: 312
Default Delete rows that DO NOT contain certain text

Hi Ken. Thanks for your response. The form of the data was text,
that was imported into Excel. So there are no formulas in their
whatsoever. Just 40K rows on each sheet.

I think I conceptually have an idea of how to speed things up. I
posted a new thread to the newsgroup called 'Combine 2 macros'.
Rather than importing multiple 40k sheets, and THEN running your
delete code on all of them, I was thinking of importing 1 sheet,
running your code to thin it out, and the looping to open 1 more
sheet, then run your code on that sheet, etc....

I posted both snippets of code in the hopes that someone would be able
to combine them into a loop. No responses yet.... :(

Thanks Ken!

PS - The application status bar update was a nice touch!!

Steph


(Steph) wrote in message . com...
Thanks guys! I really appreciate all of your help. One follow up
question - I ran this code, and it takes forever! I deleted all sheets in
the file expect for 2. Each of the 2 sheets has 38k rows. After 15
minutes, I cancelled the execution. Is my machine really slow, or is there
a quicker way to achieve this? Thanks again!

Steph


(Steph) wrote in message . com...
Hi. I have a file that has several sheets, and each sheet is about
40k rows long. It was an import from a text file. In column B is a
long text string. I need to delete all rows in every sheet that DO
NOT contain the word "logoff" OR "timeout" OR "logon" somewhere in the
cell in column B.

I am basically trying to delete the stuff I don't need so the file is
more manageable and can be worked with. Thanks in advance for your
help!

Steph