I am trying to hide/show columns based ona calculated value in cell B3.
When I change the value in B3 manually all goes fine, however if the value in B3 is a formula it doestnt work. What's wrong??
When I change the value in B3 manually all goes fine, however if the value in B3 is a formula it doestnt work. What's wrong??
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$B$3" Then
Select Case Target.Value
Case Is = "1"
Columns("C").EntireColumn.Hidden = False
Columns("D:U").EntireColumn.Hidden = True
Case Is = "2"
Columns("C:D").EntireColumn.Hidden = False
Columns("E:U").EntireColumn.Hidden = True
... etc