1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
|
Dim Tbl() As String
Dim Plage As Range
'défini la plage sur A et B
With Sheets("BASE REGISTRES ORL")
Set Plage = .Range(.Cells(2, 1), .Cells(.Rows.Count, 2).End(xlUp))
End With
'dimentionne le tableau
ReDim Tbl(1 To Plage.Rows.Count)
'charge le tableau en concaténant le nom et prénom
For i = 1 To Plage.Rows.Count
Tbl(i) = Plage.Rows(i).Cells(1, 1) & " " & Plage.Rows(i).Cells(1, 2)
Next i
'pour le test, effectue une recherche
For i = 1 To UBound(Tbl)
If Tbl(i) Like "Silve Hervé" Then MsgBox Tbl(i) 'ici utiliser i pour trouver la ligne
Next i |
Partager