Sub Msg()
Dim t, t2(), fichier, lines$, col&, x&, I&, C&, rp1, rp2
rp1 = Array("é")
rp2 = Array("é")
fichier = Application.GetOpenFilename("Fichiers Csv,*.csv")
If fichier = False Then Exit Sub
x = FreeFile: Open fichier For Input As #x: lines = Input$(LOF(x), #x): Close #x
For p = 0 To UBound(rp1): lines = Replace(lines, rp1(p), rp2(p)): Next
t = Split(Left(lines, Len(lines) - 2), vbCrLf)
ReDim t2(0 To UBound(t), 0 To 100)
For I = 1 To UBound(t)
q = Split(t(I), ";")
For C = 0 To UBound(q)
If C = 8 Or C = 0 Then t2(I - 1, C) = CDate(Trim(q(C))) Else t2(I - 1, C) = q(C)
If C > col Then col = C
Next
Next
Feuil2.Cells(Rows.Count, 1).End(xlUp).Offset(1).Resize(UBound(t2), col + 1) = t2
Feuil2.Range("A:N").RemoveDuplicates Columns:=Array(3, 4), Header:=xlYes
tri
End Sub
Sub tri()
Dim derlig
derlig = Feuil2.Cells(Rows.Count, "A").End(xlUp).Row
With Feuil2.Sort
.SortFields.Clear
.SortFields.Add Key:=Range("A2:A" & derlig), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
.SetRange Range("A1:N" & derlig)
.Header = xlYes
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
End Sub