Sub Testjnp()
Dim InputData As String, Tableau(), I As Integer, J As Integer, K As Integer
Open "C:\fichier.txt" For Input As #1
Do While Not EOF(1)
Line Input #1, InputData
ReDim Preserve Tableau(I)
Tableau(I) = InputData
I = I + 1
Loop
Close #1
For J = UBound(Tableau) To LBound(Tableau) Step -1
If Tableau(J) = "G3" Then Exit For
Next J
If J = -1 Then MsgBox "Pas trouvé": Exit Sub
For K = J To I - 1
Sheets(2).Cells(K - J + 1, 1) = Tableau(K)
Next K
Columns("A:A").Select
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
End Sub