Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default removing rows that have a blank column B only

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).

  #2   Report Post  
Posted to microsoft.public.excel.programming
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).



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Removing Blank Rows ? Robert11 New Users to Excel 3 November 13th 06 03:07 PM
Removing blank rows Carlton Patterson Excel Programming 2 July 17th 05 12:02 PM
Removing blank rows in a worksheet Louise Excel Worksheet Functions 6 May 26th 05 02:21 PM
Copying and pasting a worksheet to a blank and removing blank rows Bob Reynolds[_3_] Excel Programming 0 June 24th 04 02:55 PM
Removing Blank Rows? andycharger[_35_] Excel Programming 3 June 24th 04 02:09 AM


All times are GMT +1. The time now is 03:31 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"