Delte blank rows between different sections of data

  • Thread starter Thread starter Steven R. Berke
  • Start date Start date
S

Steven R. Berke

I have 5 sections of row of information consisting of approximately 50
securities. Between each of these sections are approximately 25 rows
which contain no material in any of the columns of any of the 25 rows.
I need a macro that will delete the blank rows between each of these
segments without deleting any of the rows containing data. For point
of information the rows with the data covers 5 columns.
 
Steven

Public Sub DeleteRowOnCell()
''delete any row that has a blank in selected column(s)
Set coltocheck = Application.InputBox(prompt:= _
"Select A Column", Type:=8)
On Error Resume Next
coltocheck.SpecialCells(xlCellTypeBlanks).EntireRow.Delete
End Sub

Non-programming method to delete blank rows..........

Select a column. Edit>Go To>Special>Blanks>OK. Edit>Delete>Entire Row.

Gord Dibben Excel MVP - XL97 SR2 & XL2002
 
Gord Dibben said:
Steven

Public Sub DeleteRowOnCell()
''delete any row that has a blank in selected column(s)
Set coltocheck = Application.InputBox(prompt:= _
"Select A Column", Type:=8)
On Error Resume Next
coltocheck.SpecialCells(xlCellTypeBlanks).EntireRow.Delete
End Sub

Non-programming method to delete blank rows..........

Select a column. Edit>Go To>Special>Blanks>OK. Edit>Delete>Entire Row.

Gord Dibben Excel MVP - XL97 SR2 & XL2002
Basically the above is helpful but the problem I am having is a little
different from the above. There is no need to select a column in fact
I do not want to have the option of selecting a column as the column
that is blank is always A. With that in mind what I want to be able
to do is to delete all rows that that are blank in column A. Point of
information is that all rows in my data that are blank in column are
also blank in every other column in that row column that
 
Back
Top