hiding rows based on cell contents

G

Guest

I want to hide certain rows in one worksheet based on the value from another
worksheet. For example, hide rows 1-10 based on the value of FALSE in cell
A1 from the other worksheet. I am assuming VBA code is needed, but I am not
that familiar with VBA other than creating simple macros. Any help would be
greatly appreciated!!

Thanks.
 
R

Roger Govier

Hi Jason

Try
Sub hiderows()
Sheets("Sheet1").Rows("1:10").EntireRow.Hidden = False
If Sheets("Sheet2").Range("A1") = False Then
Sheets("Sheet1").Rows("1:10").EntireRow.Hidden = True
End If
End Sub
 

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

Top