Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I've got this code to automate the selection and deletion of any rows that
contain a 0 (zero) in column AA. The code works fine, but rather slowly. Takes almost 1 minute to delete the zero rows in 1 worksheet, and I want to apply this code to ALOT of worksheets. Is there anything that can be done to speed this up? Dim FirstRow, LastRow, CurRow As Long Dim col As String FirstRow = 5 col = "AA" LastRow = ActiveSheet.UsedRange.SpecialCells(xlCellTypeLastC ell).Row Application.ScreenUpdating = False For CurRow = LastRow To FirstRow Step -1 If ActiveSheet.Cells(CurRow, col) = 0 Then Rows(CurRow).Delete Next CurRow MsgBox "Rows deleted!", vbInformation, "Status" |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Slow Excel Navigation with Up / Down Arrow and slow scrolling | Excel Discussion (Misc queries) | |||
A VB problem with a if structure | Excel Programming | |||
Slow opening directory structure in Excel 2002 | Excel Discussion (Misc queries) | |||
if structure help | Excel Programming | |||
Structure of If...Else in VBA | Excel Programming |