I cant seem to filter both cells..
Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("B3,F5")) Is Nothing Then Exit Sub
Application.EnableEvents = False
If Target.Value = "" Then
Range("T9:$U$297").AutoFilter Field:=1
Range("T9:$U$297").AutoFilter Field:=2
Else
Call MACRO1(Target.Value)
End If
Target.Select
Application.EnableEvents = True
End Sub
Sub MACRO1(s As String)
'
' Macro1 Macro
'
Columns("T:T").Select
Selection.AutoFilter
ActiveSheet.Range("T9:$U$297").AutoFilter Field:=1, Criteria1:=s
'
Columns("U:U").Select
Selection.AutoFilter
ActiveSheet.Range("T9:$U$297").AutoFilter Field:=2, Criteria1:=s
End Sub
Bookmarks