Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
Dim srch As String
Dim wsht As Worksheet
Dim isht As Worksheet
Dim lRow As Long
Dim DataRow As Long
Set isht = Sheets("Invoice")
If Not Intersect(Target, Target.Worksheet.[(E2)]) Is Nothing Then
srch = [(E2)].Value
For Each wsht In ThisWorkbook.Worksheets
If wsht.Name = isht.Name Then
GoTo NextSheet
Else
lRow = wsht.Cells(Rows.Count, "A").End(xlUp).Row
wsht.Range("A2:I" & lRow).AutoFilter Field:=9, Criteria1:=srch
If wsht.AutoFilter.Range.Columns(2).SpecialCells(xlCellTypeVisible).Count - 1 > 0 Then
DataRow = wsht.Range("A2").End(xlDown).Row
isht.Range("B2").Value = wsht.Cells(DataRow, "D")
isht.Range("E3").Value = wsht.Cells(DataRow, "B")
isht.Range("B6").Value = wsht.Cells(DataRow, "E")
isht.Range("C6").Value = wsht.Cells(DataRow, "C")
isht.Range("D6").Value = wsht.Cells(DataRow, "F")
Exit Sub
End If
End If
NextSheet:
Next wsht
End If
End Sub