Macro for removing rows with certain data

  • Thread starter Thread starter Rob
  • Start date Start date
R

Rob

I'm looking for a macro where it will delete a row of
cells if there is a number 2 in column 2. I'm doing it
manually by sorting then deleting but it's tidious when
you have 30,000 rows.

Thanks
 
Try this on a *spare* copy of your book

So the target col is col B
(where the #2 is to be found)
Do a Data > Filter > Autofilter on col B

In the droplist: Select "2"
(or use Custom > Equals | 2)

Select all the filtered row headers (blue)
Right-click > Delete Row

Remove Autofilter
(or select "All" under the droplist)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top