Option Explicit
Sub test()
Dim Nom_Fichier As Variant, j&, i&
Dim wbmyWb
Cells.ClearContents
Nom_Fichier = Application.GetOpenFilename
If Nom_Fichier <> False Then
Set wbmyWb = Workbooks.Open(Nom_Fichier)
j = 2
With wbmyWb.Sheets(1)
For i = 1 To .[A65536].End(xlUp).Row
If .Cells(i, 1) Like "*pas*" And .Cells(i, 1) Like "*ko*" Then
ThisWorkbook.Sheets(1).Cells(j, 1) = .Cells(i, 1)
ThisWorkbook.Sheets(1).Cells(j, 2) = i
j = j + 1
End If
Next
End With
wbmyWb.Close
[A1] = "Mots trouvés": [B1] = "Lignes"
Columns("A:B").EntireColumn.AutoFit
End If
End Sub