View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Jim Thomlinson Jim Thomlinson is offline
external usenet poster
 
Posts: 5,939
Default how to hide a number of cells based on one cell?

What you are asking for requires a macro. If you want to persue that then
right click the sheet tab, select view code and paste the following...

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$A$1" Then
If LCase(Target.Value) = "no" Then
Rows("4:15").Hidden = True
Else
Rows("4:15").Hidden = False
End If
End If

If Target.Address = "$A$19" Then
If LCase(Target.Value) = "no" Then
Rows("20:100").Hidden = True
Else
Rows("20:100").Hidden = False
End If
End If

End Sub
--
HTH...

Jim Thomlinson


"TG" wrote:

Hello,

How would I be able to hide lets say row 4-15 if A1 had the word no?
Is this even possible? Also, what if i also want to hide rows 20-100 if A19
says "no"?

Thank you in advance,

TG