Sub recherche()
If IsNumeric(Range("B3")) Then 'SI NUMERIQUE
Dim nom As String, prenom As String, upc As String
If Application.WorksheetFunction.VLookup([b3], Sheets("UA").Range("B:F"), 2, False) <> "" Then 'SI N° existant
nom = Application.WorksheetFunction.VLookup([b3], Sheets("UA").Range("B:F"), 2, False)
prenom = WorksheetFunction.VLookup([b3], Sheets("UA").Range("B:F"), 3, False)
upc = WorksheetFunction.VLookup([b3], Sheets("UA").Range("B:F"), 5, False)
MsgBox nom & " " & prenom & ", " & upc
Else 'SI N° inexistant
MsgBox "Le log " & Range("B3") & " n'est pas un numéro existant !"
Range("B3").ClearContents
End If
Else 'SI NON NUMERIQUE
MsgBox "La valeur " & Range("B3") & " n'est pas valide !"
Range("B3").ClearContents
End If
End Sub