Deleting Blank rows

  • Thread starter Thread starter Jarrod
  • Start date Start date
J

Jarrod

Other than sorting, does anyone know how to delete all
blank rows from a report in excel. The reason we need this
is b/c we have a software aplication that exports to
excel, but places blank rows in between each row
containing data. Any help would be apprecieted. I found
how to use Visual Basic Editor to insert a rows, but not
how to remove/delete empty rows.
 
Jarrod, Here is one way, select edit, go to, special, blanks, OK, then
select edit delete, delete entire row
--
Paul B
Always backup your data before trying something new
Using Excel 97 & 2000
Please post any response to the newsgroups so others can benefit from it
** remove news from my email address to reply by email **
 
Jarrod, after reading it again you may want a macro, here is one that will
delete the rows where A1:A50 are blank, change the range to yours

Sub Delete_blank()
'Will delete the whole row where there are blank cells in A1:A50
[A1:A50].SpecialCells(xlCellTypeBlanks).EntireRow.Delete
End Sub
 
Paul,

Just wanted to send you a thank you for helping us out on
that one. I was on the phone working with a client and we
were both struggling with this one. The issue we were
having had to do with the fact you have to highlight the
column that determines which rows get deleted. Most of the
rows we wanted to keep had data in column A, but the total
columns had no data in column A (only in column B)and they
were getting deleted. So, we just pasted special B into
column A ignoring blanks....it worked. So, the column you
select determines which rows get deleted based on if the
cell within that column is blank...regardless if data
exists in other cells within that row. They will be
deleted as well.

Thanks again!
 
One way:

You can use Autofilter and Select Visible Cells to delete the blank rows.

To access Select Visible Cells you'll need to add it to your tool bar.
Tools > Customize > Commands. Select Edit on the left and drag Select
Visible Cells from the list on the right onto your Toolbar. Click Close.

Select your data then Data > Filter > Autofilter. Filter all your fields so
that only Blanks are shown. Select the blank rows and click Select Visible
Cells. Edit > Delete Row. Data > Filter > Autofilter.

HTH.

-Dave
 
Back
Top