hello
I try writing code , actually it works but not completely when write the value in e1 it shows the message what I would when I write the right value shouldn't show the message and if the value is not existed then shows message and clear the cells
Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("E1")) Is Nothing Then Exit Sub
If Target.Count > 1 Then Exit Sub
Dim ws As Worksheet
Dim lr As Long, res As Variant
For Each ws In Worksheets
lr = ws.Cells(Rows.Count, 2).End(xlUp).Row
res = Application.Match(Target.Value, ws.Range("B1:B" & lr), 0)
If IsError(res) Then MsgBox "No match found": Exit Sub
Target.Range("E3:E7").ClearContents
With Target
.Offset(2, 0).Value = ws.Cells(res, 2).Value
.Offset(3, 0).Value = ws.Cells(res, 3).Value
.Offset(4, 0).Value = ws.Cells(res, 4).Value
.Offset(5, 0).Value = ws.Cells(res, 5).Value
.Offset(6, 0).Value = ws.Cells(res, 6).Value
End With
Next
End Sub