removing rows that have a blank column B only

G

Guest

I would like to run a macro to do as follows.
on a day to day basis I'm given a spreadsheet. The headers/columns are all
the same. I sort column 'B' which is the key information I need. Anything
blank in column B is useless to me. So I highlight all the rows that have a
blank column B and delete them. obviously with every spreadsheets sometimes
there's only 2 rows to be deleted and sometimes there's 200. is there a way
to write a macro that would do this automatically for me, instead of having
to do this manual everyday.

I tried using Selection.End(xlDown) but it takes me to the bottom of all the
records.
all of column A has a value, and sometimes column C has a value (if this
helps).
 
N

Norman Jones

Hi Savbci,

Try:

Sub Tester()

On Error Resume Next
Columns("B:B").SpecialCells(xlBlanks).EntireRow.Delete
On Error GoTo 0

End Sub
 

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

Top