Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Eliminating rows of data in excel spreadsheet that have blank cell in row A and data in row B - E

I have several rows of data at the bottom of an excel file that I want
to delete. These rows consist of 5 columns of data but in the case of
the rows I want to delete there is no data in cell A. This feature
only exists in the cells of the rows I want to delete all the other
rows have data in column "A". What I need is a macro that will delete
the rows that have blank cells in row "A" but have data in row "B"
thru "E".
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 280
Default Eliminating rows of data in excel spreadsheet that have blank cell in row A and data in row B - E

Steven,
If you want to delete all rows in the active worksheet that have a blank
cell in column A, this will do it.

Activesheet.Columns("A").SpecialCells(xlBlanks).En tireRow.Delete xlShiftUp

If you want to operate on a particular workbook, whether or not it is
active, this will do it.

Workbooks("Book1.xls").Worksheets("Sheet1").Column s("A").SpecialCells(xlBlan
ks).EntireRow.Delete xlShiftUp

If you want to operate on a worksheet in the workbook where the code
resides, this will do it.

This
workbook.Worksheets("Sheet1").Columns("A").Special Cells(xlBlanks).EntireRow.
Delete xlShiftUp


Bob Kilmer

"Steven R. Berke" wrote in message
om...
I have several rows of data at the bottom of an excel file that I want
to delete. These rows consist of 5 columns of data but in the case of
the rows I want to delete there is no data in cell A. This feature
only exists in the cells of the rows I want to delete all the other
rows have data in column "A". What I need is a macro that will delete
the rows that have blank cells in row "A" but have data in row "B"
thru "E".



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
Eliminating blank rows Fred Smith[_4_] Excel Worksheet Functions 0 August 1st 09 02:07 AM
Eliminating Blank rows Lversteeg Excel Worksheet Functions 3 May 14th 09 03:27 AM
Excel 2003-eliminating blank rows in target worksheet Rich D Excel Discussion (Misc queries) 0 January 3rd 08 07:33 PM
Copy rows of data (eliminating blank rows) from fixed layout Sweepea Excel Discussion (Misc queries) 1 March 14th 07 12:05 AM
Eliminating Blank Rows Tatebana Excel Discussion (Misc queries) 4 February 19th 07 06:24 PM


All times are GMT +1. The time now is 12:59 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"