Imagine you have a column A, where codes for certain categories are listed. I
would like Columns B and C, which are hidden, to be unhidden, when a certain
code is being entered in column A.
Imagine you have a column A, where codes for certain categories are listed. I
would like Columns B and C, which are hidden, to be unhidden, when a certain
code is being entered in column A.
Hi,
Hope this will help.
Private Sub Worksheet_Change(ByVal Target As Range)
Col = ActiveCell.Column
Stop
If Col = 1 And ActiveCell.Value = "Certain Value" Then
ActiveCell.Columns("B:C").EntireColumn.Select
Selection.EntireColumn.Hidden = False
ActiveCell.Select
Else
End If
End Sub
"Frederic" wrote:
> Imagine you have a column A, where codes for certain categories are listed. I
> would like Columns B and C, which are hidden, to be unhidden, when a certain
> code is being entered in column A.
A bit simpler, no selects
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.column = 1 And Target.Value = "Certain Value" Then
Columns("B:C")..Hidden = False
End If
End Sub
Also, this code should go into the appropriate sheet code module, not a
standard code module.
--
HTH
Bob Phillips
"David" <David@discussions.microsoft.com> wrote in message
news:89E1FF1E-99D6-4660-8A02-95140E33A386@microsoft.com...
> Hi,
> Hope this will help.
> Private Sub Worksheet_Change(ByVal Target As Range)
> Col = ActiveCell.Column
> Stop
> If Col = 1 And ActiveCell.Value = "Certain Value" Then
> ActiveCell.Columns("B:C").EntireColumn.Select
> Selection.EntireColumn.Hidden = False
> ActiveCell.Select
> Else
> End If
> End Sub
>
> "Frederic" wrote:
>
> > Imagine you have a column A, where codes for certain categories are
listed. I
> > would like Columns B and C, which are hidden, to be unhidden, when a
certain
> > code is being entered in column A.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks