Thread
:
Automatically hide column or row if a cell value meets criteria
View Single Post
#
2
Posted to microsoft.public.excel.worksheet.functions
Gord Dibben
external usenet poster
Posts: 22,906
Automatically hide column or row if a cell value meets criteria
Private Sub Worksheet_Calculate()
On Error GoTo stoppit
Application.EnableEvents = False
With Me.Range("C3")
If .Value = 0 Then
.EntireRow.Hidden = True
Else
.EntireRow.Hidden = False
End If
End With
stoppit:
Application.EnableEvents = True
End Sub
Gord Dibben MS Excel MVP
On Wed, 4 Jun 2008 06:56:37 -0700 (PDT),
wrote:
I need a macro or formula that will automatically hide a row or column
based on an entry in a specific cell.
For instance, =IF(D2="",*****,D2)
with ***** being the formula
or =IF(C3=0,Rows("3:3").Select,Selection.EntireRow.Hi dden=True,C3)
of course this isn't working but something like this would be great
Thanks so much for your continued assistance.
Don
Reply With Quote
Gord Dibben
View Public Profile
Find all posts by Gord Dibben