Hi Guys,
The following code seems to run fairly well... but is there anyway to make it run only when the relevant cells are used. (you can see the curser think every time you move the active cell)
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Application.ScreenUpdating = False
'Expand Trade Columns
If Target.Column = 24 Or Target.Column = 25 Or Target.Column = 26 Then
Columns("Y:Z").EntireColumn.Hidden = False
Else: Columns("Y:Z").EntireColumn.Hidden = True
End If
Application.ScreenUpdating = True
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
Application.ScreenUpdating = False
If Target.Address = "$H$13" Or Target.Address = "$K$13" Then
Range("A13:A400").AutoFilter Field:=1, Criteria1:="1"
End If
Application.ScreenUpdating = True
End Sub
The following code seems to run fairly well... but is there anyway to make it run only when the relevant cells are used. (you can see the curser think every time you move the active cell)
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Application.ScreenUpdating = False
'Expand Trade Columns
If Target.Column = 24 Or Target.Column = 25 Or Target.Column = 26 Then
Columns("Y:Z").EntireColumn.Hidden = False
Else: Columns("Y:Z").EntireColumn.Hidden = True
End If
Application.ScreenUpdating = True
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
Application.ScreenUpdating = False
If Target.Address = "$H$13" Or Target.Address = "$K$13" Then
Range("A13:A400").AutoFilter Field:=1, Criteria1:="1"
End If
Application.ScreenUpdating = True
End Sub