Private Sub Worksheet_SelectionChange(ByVal Target As Range) On Error Resume Next a = Target.Row aa = Cells(a, 6).Value bb = Cells(a, 9).Value Sheets("2").ShowAllData Sheets("2").Range("$A$1:$H$5208").AutoFilter Field:=1, Criteria1:=aa Sheets("3").ShowAllData Sheets("3").Range("$A$1:$K$10000").AutoFilter Field:=1, Criteria1:=bb End Sub