View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jim Cone Jim Cone is offline
external usenet poster
 
Posts: 3,290
Default Excel 2003: VBA: How to Speed Up Row Deletions

One thing that could help is...
ActiveSheet.DisplayPageBreaks = False
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware



"BEEJAY"
wrote in message
Looking for suggestion on how to change the following as required,
to greatly improve speed of operation.
Without the following: about 5-6 seconds
WITH the following: about 30 seconds.

Dim LastRow As Long
Application.ScreenUpdating = False
LastRow = ActiveSheet.Cells(Rows.Count, "B").End(xlUp).Row
For RowNdx = LastRow To 1 Step -1
If Cells(RowNdx, "B").Value = "x" Then
Rows(RowNdx).Delete
End If
Next RowNdx