View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Mike H Mike H is offline
external usenet poster
 
Posts: 11,501
Default Delete Blank Rows

Heather,


Here's a VB solution. Right click the sheet tab, view code and paste this
in. Slect the range you want to delete blank rows in and run the code.

Sub DeleteBlankRows()
Dim i As Long
Application.ScreenUpdating = False
For x = selection.Rows.Count To 1 Step -1
If WorksheetFunction.CountA(selection.Rows(x)) = 0 Then
selection.Rows(x).EntireRow.Delete
End If
Next
Application.ScreenUpdating = True
End Sub

Mike

"Heather" wrote:

Hi, I need to find a way to delete wholly blank rows from a spreadsheet that
also includes blank cells.
I tried F5special...radio button BlanksOK ctrl+- delete rows , but that
also deletes rows that have data in them along with a blank cell!

Is there an equally neat way of deleting rows that have no data in them at
all, but leaving partial rows?