macro to hide rows

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I need to hide rows depending on whats in the cells (a1,a2,a3,...)

can somewane give me a example of a macro for this.

thank you
 
David,

something like this: just subsitute the number of rows in the For loop and
the values you want to test.

Sub Hide_Unwanted_Rows()

Dim X as Integer

For X = 2 to 100

If cells(x,1).value =0 Then
Rows(x).hidden=true
End if

Next x

End Sub

Cheers, Pete.
 
thanks !!!!!!!!!!!



------------------------------------------------------
 

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