select and delete specific rows

  • Thread starter Thread starter Paulg
  • Start date Start date
P

Paulg

I have a text report I import into excel that has headers and blank row
between the headers.

I need some code to delete rows that begin with specific words, such a
"subscriber", or "Payment type", and also deletes any blank rows.

Thank
 
without code try this:

suppose your data is in column B (if not add a column at right of you
data column), put 1 in column A to the right of cells that you want t
delete (whole row) and also put 1 on right of cells that are empty
when you have entered 1 in the right of cells that you want to delete
select column A and press F5 to open Go To window > press Special ta
and click Constants and then Ok. it will select cells that contain
(actually these cells are in rows that you want to remove) now pres
Ctrl+- (Ctrl and minus sign) it will open a Delete window, selec
Entire row and click Ok. All rows will be deleted which contain 1 i
col A.

hope this would serve your purpose.
 

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