Private Sub CommandButton1_Click()
Dim Fichier$, dl&
ThisWorkbook.Sheets("Base").Cells.Clear
Fichier = Application.GetOpenFilename("CSV Files (*.CSV), *.csv")
Workbooks.OpenText Fichier, Local:=True
ActiveWorkbook.Sheets(1).Range("A1").CurrentRegion.Copy ThisWorkbook.Sheets("Base").Range("A5")
ActiveWorkbook.Close False
With ThisWorkbook.Sheets("Base")
.Columns("D:D").Cut: .Columns("A:A").Insert Shift:=xlToRight
.Columns("F:F").Insert Shift:=xlToRight: .Columns("H:H").Insert Shift:=xlToRight: .Columns("J:J").Insert Shift:=xlToRight
dl = .Cells(Rows.Count, "E").End(xlUp).Row
.Range("E6:E" & dl).TextToColumns Destination:=Range("E6"), DecimalSeparator:="."
.Range("E6:F" & dl).NumberFormat = "#,##0.00"
.[F5] = "Nb Kilomètres totaux": .[H5] = "Durées totales - Vitesse > 74 kms"
.[J5] = "Durées totales - Déccélération > 10 Km/h/s": .[L5] = "Durées totales - Accélération > 6 Km/h/s"
For i = 5 To 11 Step 2
.Range(Cells(6, i + 1), Cells(dl, i + 1)).FormulaR1C1 = "=SUMIF(R6C1:R" & dl & "C1,RC1,R6C" & i & ":R" & dl & "C" & i & ")"
Next
.Range("A5:L5").Columns.AutoFit: .Columns("G:L").NumberFormat = "h:mm"
End With
End Sub