removing rows that have a blank column B only

  • Thread starter Thread starter Guest
  • Start date Start date
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).
 
Hi Savbci,

Try:

Sub Tester()

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

End Sub
 
Back
Top