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

Please help for the above subject.

the following module only able delete the empty row at Column A only.
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
Cells(i, "A").Delete Shift:=xlUp
End If
Next
End Sub

But i need to delete a range from Column A to H.

Thank you for your kind attention.