Hi,
Any help to change the following code into a standard module code would be kindly appreciated.
Any help to change the following code into a standard module code would be kindly appreciated.
Code:
<code>Private Sub Worksheet_Change(ByVal Target As Range)
Dim n As Long
If Not Intersect(Range("E5:E6"), Target) Is Nothing Then
Application.ScreenUpdating = False
If Range("E5") <> "" And Range("E6") <> "" Then
Select Case Range("E5").Value
Case "Customer"
n = 3
Case "Name"
n = 4
Case "City"
n = 5
Case "Type"
n = 9
End Select
Range("C10").AutoFilter Field:=n, Criteria1:=Range("E6").Text
Application.ScreenUpdating = True
End If
End If
End Sub</code>