Steedson
merci pour ton retour. Voici le code utilisé initialement et qui ne fonctionne pas
Private Sub CommandButton1_Click()
UserForm4.Show
End Sub
Private Sub T1_Change()
Dim i&, fin&, Y&, a&, aa, bb, lig&, col&
Application.ScreenUpdating = 0
If T1 = "" Then L1.Clear: Exit Sub
L1.Clear
With Feuil1
Y = 1
fin = .Range("Y" & Rows.Count).End(xlUp).Row
col = .Cells(5, Columns.Count).End(xlToLeft).Column + 2
If fin < 2 Then fin = 2: Exit Sub
aa = .Range(.Cells(2, 1), .Cells(fin, col))
End With
For i = 1 To UBound(aa)
aa(i, UBound(aa, 2) - 1) = i + 1
aa(i, UBound(aa, 2)) = ""
Next i
For i = 1 To UBound(aa)
For a = 1 To UBound(aa, 2)
If aa(i, a) Like "*" & T1 & "*" Then aa(i, UBound(aa, 2)) = "oui": Y = Y + 1: Exit For
Next a
Next i
If Y = 1 Then Exit Sub
ReDim bb(Y - 1, UBound(aa, 2) - 1)
Y = 1
For i = 1 To UBound(aa)
If aa(i, UBound(aa, 2)) = "oui" Then
For a = 1 To UBound(aa, 2) - 1
bb(Y, a) = aa(i, a)
Next a
Y = Y + 1
End If
Next i
With L1
.ColumnCount = UBound(aa, 2) - 2
.List = bb
End With
End Sub