How do I display certain lines depnding on a cell critrera
Hi,
right click your sheet tab, view code and paste this in and try selecting A1
or A2
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Select Case Target.Address
Case Is = ("$A$1")
Rows("10:20").EntireRow.Hidden = True
Rows("21:40").EntireRow.Hidden = False
Case Is = ("$A$2")
Rows("10:20").EntireRow.Hidden = False
Rows("21:40").EntireRow.Hidden = True
End Select
End Sub
Mike
"Greg S" wrote:
I have two options to select from and only one of the options can be
selected, lets call it A1 and A2.
If a person selects A1, I would like to view only lines 10 - 20, however if
a person selects A2, I would like to view only lines 20 - 40.
Greg
|