View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Gord Dibben Gord Dibben is offline
external usenet poster
 
Posts: 22,906
Default Need Help Deleting Blank Rows

Sub DeleteRows_If_A_to_AC_MT()
Dim lRow As Long
Dim StartRow As Long
Dim EndRow As Long
StartRow = 1

EndRow = Cells(Rows.Count, 1).End(xlUp).Row

'EndRow = 1000

For lRow = EndRow To StartRow Step -1

If Application.CountA(Range(Cells(lRow, "A"), _
Cells(lRow, "AC"))) = 0 Then
Rows(lRow).Delete
End If
Next

End Sub


Gord Dibben MS Excel MVP

On Mon, 22 Feb 2010 07:36:01 -0800, JCG
wrote:

Thanks for responding. The rule that will work with this spread sheet data
is "If there is NO data in columns A through AC, consider the row blank and
delete it" Can this be done? Thanks again...j