How do I conditionally hide a worksheet

J

Jeremehovah

I would like to have different worksheet tabs that are only viewable based on
answers given on a main page. Say I have 4 conditional pages, based on 1 of
4 answers given on that main page only one would be viewable and the other
three would remain hidden.

Is this even possible?
 
R

Reitanos

I don't know of a way to do that with a formula, but you could use a
worksheet change macro like this:

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = Range("B7").Address And Target.Formula =
"Hide" Then
Worksheets("Sheet2").Visible = False
End If
End Sub

It will hide Sheet2 if B7 is changed and it is changed to the word
Hide.
Don't forget to write a way for it to return ;)
 

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