Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello All,
I am using the following code below to hide rows if cells in the range are blank. It performs the function I desire better than any other solution I tried. However, it runs slow (~10 seconds) and a cell in the sheet has to be clicked to run the code if the blank cells in the range have changed and it then runs everytime a cell in the sheet is clicked or edited. Is there a way to speed it up greatly? and/or have it automatically update / update on change in the range only? and/or not run every time a cell in the sheet is clicked/edited? I am a novice programmer. Thank you for any help! Option Compare Text Sub Worksheet_SelectionChange(ByVal Target As Excel.Range) Dim cell As Range Application.ScreenUpdating = False With ActiveSheet.UsedRange .Rows.Hidden = False For Each cell In Range("A18:A98") If cell.Value = "" Then _ cell.EntireRow.Hidden = True Next cell End With End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Slow VBA code....Hide/Unhide Loop | Excel Worksheet Functions | |||
VBA code to hide blank rows | Excel Worksheet Functions | |||
Modification in the CODE to HIDE rows and columns that start with ZERO (code given) | Excel Programming | |||
Hide Blank Rows | Excel Worksheet Functions | |||
code running super slow... | Excel Programming |