View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
jtp jtp is offline
external usenet poster
 
Posts: 1
Default Deleted empty row for some columns


Hi Andri,
This should delete Columns A -- H. I am assuming you want to delete
it and push the next row up and not just clear out the selection.

-Sub DeleteEmptyRow()
Dim cRows As Long
Dim i As Long

cRows = Cells(Rows.Count, "A").End(xlUp).Row
For i = cRows To 1 Step -1
If Cells(i, "A").Value = "" Then
Range("A" & i, "H" & i).Delete shift:=xlUp
End If
Next
End Sub-

Hope this helps,

Jason


--
jtp
------------------------------------------------------------------------
jtp's Profile: http://www.excelforum.com/member.php...o&userid=21132
View this thread: http://www.excelforum.com/showthread...hreadid=495968