Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Hiding Empty Rows
I have been using the code below to hide empty rows in a worksheet.
Originally I was only evaluating 12 columns (one for each month of the year) in each of about 100 rows to determine whether to hide the entire row. The number of rows has grown to about 350 and now the code runs rather slow. About 7-10secs versus the 2 secs it used to take. Anyone with any ideas on how to improved the speed of this code?? Dim bytCol As Byte Dim lngRow As Integer Application.ScreenUpdating = False For lngRow = 8 To 359 'All Rows For bytCol = 4 To 15 'Columns D-O If ActiveSheet.Cells(lngRow, bytCol) < 0 Then Exit For If bytCol = 15 Then ActiveSheet.Rows(lngRow).Hidden = True Next bytCol Next lngRow Application.ScreenUpdating = True Thanks....AJ |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Hiding Various Empty Rows | Excel Discussion (Misc queries) | |||
Delete Rows with Empty Cells with empty column 1 | Excel Programming | |||
How do I sort with empty rows between none empty rows? | Excel Worksheet Functions | |||
Hiding a button when hiding rows | Excel Discussion (Misc queries) | |||
Hiding an empty row? | Excel Programming |