Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Might do better with this that checks for formula cells and hides just those
rows with 0 in Z and not all blank rows in used range. Private Sub Worksheet_Calculate() On Error GoTo stoppit Application.EnableEvents = False With ActiveSheet.UsedRange .Rows.Hidden = False For Each cell In .Columns(26).SpecialCells(xlCellTypeFormulas) If cell.Text = "" Or cell.Value = 0 Then _ cell.EntireRow.Hidden = True Next cell End With stoppit: Application.EnableEvents = True End Sub Gord Dibben MS Excel MVP On Wed, 20 Jun 2007 10:14:01 -0700, Gary''s Student wrote: Put the following in worksheet code: Private Sub Worksheet_Calculate() Application.EnableEvents = False Set r = Intersect(Range("Z:Z"), ActiveSheet.UsedRange) For Each rr In r If rr.Value = 0 Then rr.EntireRow.Hidden = True End If Next Application.EnableEvents = True End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Is there a way to automatically hide empty rows? | Excel Worksheet Functions | |||
How do I set up Excel to automatically hide certain rows? | Excel Discussion (Misc queries) | |||
automatically hide rows with zero value | Excel Worksheet Functions | |||
Hide rows automatically | Excel Discussion (Misc queries) | |||
How do I automatically hide rows | Excel Discussion (Misc queries) |