Hide a row based on values

S

stevenmckeon

Is it possible to hide a row based on a value within the row?

If cell A1= true display row A

else hide row A from view

I will be running this in all versions of Excel from 97 to 2003 ar
there any limitations on which will work and which will not?

Any assistance is appreciated
 
B

Bob Phillips

Steve,

Are you looking for a macro to loop through a range hiding as it goes, or
one that hides the row as A1 doesn't equal TRUE? If the latter, how would
you reset?

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
R

ross

Hi try this

Private Sub CommandButton1_Click()

If Range("A12").Value = "True" Then
Rows("9:9").Select
Selection.EntireRow.Hidden = True
Else
Rows("9:9").Select
Selection.EntireRow.Hidden = False
End If
End Sub

good luck

ross
 
Top