View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Norman Jones Norman Jones is offline
external usenet poster
 
Posts: 5,302
Default removing rows that have a blank column B only

Hi Savbci,

Try:

Sub Tester()

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

End Sub

---
Regards,
Norman



"savbci" wrote in message
...
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).