Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Code runs to slow
We have a spreadsheet into which we dump a large amount of data (averaging
around 55,000+ rows). We then use formulas to detect error in the data so that we can go back into the original program and correct those errors. What the code below does (my thanks to Rick Rothstein, MVP -VB) is hides all rows which do not have errors leaving only the rows with errors (saves one from having to scroll through more than 55,000 rows in search of errors). My problem is that it takes to long to hide the rows (in excess of 5 minutes). Does anyone have any thoughts on how to speed up the process? Sub HideRowIfZeroInG() ' ' Application.ScreenUpdating = False Dim R As Range Dim LastRow As Long With Worksheets("Negative Miles and Missing Perf") LastRow = .Cells(Rows.Count, "J").End(xlUp).Row If LastRow 65536 Then LastRow = 65536 For Each R In .Range("J3:J" & CStr(LastRow)) If R.Value = 0 And R.Value < "" Then R.EntireRow.Hidden = True Next End With Application.ScreenUpdating = True End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel runs slow | Excel Worksheet Functions | |||
Excel Runs Slow | Excel Discussion (Misc queries) | |||
Runs fast then slow | Excel Programming | |||
After printing, macro runs slow??? | Excel Programming | |||
Macro runs slow | Excel Programming |