View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
HamishM[_3_] HamishM[_3_] is offline
external usenet poster
 
Posts: 1
Default Define Range in Deleting Empty Rows

Hi,
Am using the following code to remove empty rows. How can i set th
rows to be checked eg. A15:A2500


Sub DeleteBlankRows1()

Dim i As Long

With Application
.Calculation = xlCalculationManual
.ScreenUpdating = False

For i = Selection.Rows.Count To 1 Step -1
If WorksheetFunction.CountA(Selection.Rows(i)) = 0 Then
Selection.Rows(i).EntireRow.Delete
End If
Next i

.Calculation = xlCalculationAutomatic
.ScreenUpdating = True
End With
End Sub


thanks,
Hamis

--
Message posted from http://www.ExcelForum.com