Re
J'ai trouvé ce code est ça fonctionne.
Sub Test()
Dim Tablo() As Long
Dim I As Integer
Dim Lignes As String
Dim MonMot As String
MonMot = "OK" '<-- adapter le mot recherché...
Tablo = Rechercher(MonMot)
If Tablo(1) = -1 Then
MsgBox "Le mot '" & MonMot & "' est introuvable !"
Exit Sub
End If
'Lignes = "Les lignes où se trouve le mot recherché sont : "
For I = 1 To UBound(Tablo)
Lignes = Lignes & vbCrLf & Tablo(I)
Next I
MsgBox Lignes
End Sub
Function Rechercher(Mot As String) As Long()
Dim Plage As Range
Dim Cel As Range
Dim Tbl() As Long
Dim Adr As String
Dim I As Integer
With ActiveSheet
Set Plage = .Range(.Cells(2, 10), .Cells(.Rows.Count, 10).End(xlUp))
End With
Set Cel = Plage.Find(Mot, , xlValues, xlWhole)
If Not Cel Is Nothing Then
Adr = Cel.Address
Do
I = I + 1
ReDim Preserve Tbl(1 To I)
Tbl(I) = Cel.Row
Set Cel = Plage.FindNext(Cel)
Loop While Adr <> Cel.Address
Else
ReDim Tbl(1 To 1)
Tbl(1) = -1
End If
Rechercher = Tbl()
End Function