View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Delete a list of rows

You can loop through your list and do the deletions, however, you list would
need to be sorted by row, so you always start with the highest row on a
sheet and work down to the lowest row - otherwise, the row numbers will
change when you delete a lower row and you will start deleting the wrong
row.

so assume you are looping through column A using i

for i = numrows to 1 step -1
worksheets(cells(i,4).value).Rows(Cells(i,5).Value ) _
.EntireRow.Delete
Next

--
Regards,
Tom Ogilvy

"John Fevens" wrote in message
om...
I have a number of workbooks that contain multiple tabs.


I have a list of rows that are duplicated on one or more tabs. Is
there quick and dirty way for me to run a macro deleting the rows from
the list??


I.e.

My list contains the following columns
A B C D E
ref# worksheet row worksheet row


I would like to "clear" all of the references at D and E.