View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Mike[_81_] Mike[_81_] is offline
external usenet poster
 
Posts: 5
Default Is there a smart way to select multiple rows based on column...

The usual scenario i'm afraid... not that i haven't done it, but just got a feeling it can be more efficiently done... thanks for bearing with me :

I have 2 sheets to compare... "Sheet1" has unique IDs in column "A", as does "Sheet2". The IDs are only listed once on Sheet1, but can appear on many rows in Sheet2. I have written a loop to cycle through the IDs in Sheet1 - on each loop, it runs down the whole list of IDs in Sheet2, and deletes any rows that match. At the end, it increments to the next ID on Sheet1. This works fine, but can be a very slow process with long lists on Sheet2..

I wonder if it is possible to use a SpecialCells / other technique to mass-select the rows on Sheet2 matching the ID, and delete these en-masse, then continue to next ID... The compiled processes run much faster..
If anyone can suggest if this is possible, or suggest a starting point, I would appreciate it

Many thanks

Mike