Sub Tableau_Csv()
Dim i&, k&, l&
Dim oTxt$, oDat(), sDat(), oCol()
'Au choix, l'une des deux lignes suivantes :
oCol = Array("F", "G", "H", "I", "L", "O", "R", "J", "M", "P", "S", "K", "N", "Q", "T")
' oCol = Array(6, 7, 8, 9, 12, 15, 18, 10, 13, 16, 19, 11, 14, 17, 20)
oDat = Feuil1.[A10].CurrentRegion.Value
With Feuil2
oTxt = .[B1].Value
ReDim sDat(1 To UBound(oCol) + 1, 1 To 1)
If oTxt <> "" Then
For i = 2 To UBound(oDat, 1)
If oDat(i, 1) Like "*" & oTxt & "*" Then
l = l + 1
ReDim Preserve sDat(1 To UBound(sDat, 1), 1 To l)
For k = 0 To UBound(oCol)
sDat(k + 1, l) = oDat(i, Columns(oCol(k)).Column)
Next k
End If
Next i
End If
.[A1].CurrentRegion.Offset(1, 0).ClearContents
.[A2].Resize(l - (l = 0), UBound(sDat, 1)).Value = WorksheetFunction.Transpose(sDat)
End With
End Sub