Bonjour Mélanie, bonjour Zebulon
On ne connait pas ta version d'excel
Si tu n'as pas PowerQ, voici une solution VBA
Option Explicit
Const sep = ","
Sub relever()
Dim chemin$, Rep As FileDialog
' choix du répertoire
Set Rep = Application.FileDialog(msoFileDialogFolderPicker)
Application.FileDialog(msoFileDialogFolderPicker).Title = "Choix du répertoire des fichiers ..."
Rep.Show
If Rep.SelectedItems.Count = 0 Then Exit Sub
chemin = Rep.SelectedItems(1) & "\"
importCSV chemin
End Sub
Sub importCSV(chemin As String)
Dim fichier$, tbl, ff%, i%, ContenuLigne$
Range("A1").CurrentRegion.Offset(1, 0).ClearContents
i = 1
fichier = Dir(chemin & "*.csv")
Do While fichier <> ""
ff = FreeFile
Open chemin & fichier For Input As #ff
Do While Not EOF(1)
Line Input #ff, ContenuLigne
tbl = Split(ContenuLigne, sep)
If IsNumeric(tbl(25)) And tbl(25) >= 170 Then
i = i + 1
Cells(i, 1) = tbl(0)
Cells(i, 2) = tbl(1)
Cells(i, 3) = tbl(5)
Cells(i, 4) = tbl(25)
End If
Loop
Close #ff
fichier = Dir
Loop
End Sub