Hide a row based on values

  • Thread starter Thread starter stevenmckeon
  • Start date Start date
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
 
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)
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top