1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
| Sub ChercherTrouver()
If Not ActiveCell.Value = Empty Then 'On se déplace dans la colonne A
NomEntreprise = ActiveCell.Value 'Pris dans Feuil1 colonne A
Worksheets("Feuil2").Select
Range("A1").Select
Columns("A:A").Select
Selection.Find(What:=NomEntreprise, After:=ActiveCell, LookIn:= _
xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:= _
xlNext, MatchCase:=False).Activate
msg = Cells(ActiveCell.Row, 1).Value 'Colonne du nom
msg = msg & vbCrLf & Cells(ActiveCell.Row, 2).Value 'colonne du téléphone
msg = msg & vbCrLf & Cells(ActiveCell.Row, 3).Value 'colonne de l'adresse
MsgBox msg
Else
Exit Sub
End If
Worksheets("Feuil1").Select
End Sub |
Partager