=DATE(DROITE(A2;4);DROITE(GAUCHE(A2;5);2);GAUCHE(A2;2))
=DATEVAL(SUBSTITUE(A1;".";"/"))
Sub Format_Dates()
Dim Ligne As Long
Dim Rep As String
Dim Colonne As Variant
Dim A, B, T
Colonne = ActiveCell.Column
Colonne = Split(Columns(Colonne).Address(ColumnAbsolute:=False), ":")(1)
Ligne = ActiveCell.Row
Application.ScreenUpdating = False
With ActiveSheet 'Mise au format des dates d'échéance
With .Range(Colonne & Ligne & ":" & Colonne & Range(Colonne & Rows.Count).End(xlUp).Row)
T = .Value
For A = 1 To UBound(T, 1)
For B = 1 To UBound(T, 2)
T(A, B) = Replace(T(A, B), ".", "/")
.Item(A) = CDate(T(A, B))
Next
Next
End With
End With
End Sub
Sub FormatDates()
Dim RngCol As Range, T(), L As Long
Set RngCol = ActiveCell
Set RngCol = RngCol.Resize(RngCol(1000000, 1).End(xlUp).Row - RngCol.Row + 1)
T = RngCol.Value
For L = 1 To UBound(T, 1)
T(L, 1) = CDate(Replace(T(L, 1), ".", "/"))
Next L
RngCol.Value = T
End Sub
T = RngCol.Value
Sub FormatDates()
Dim RngCol As Range, T(), L As Long
Set RngCol = ActiveCell
Set RngCol = RngCol.Resize(RngCol(1000000, 1).End(xlUp).Row - RngCol.Row + 1)
If RngCol.Rows.Count = 1 Then
ReDim T(1 To 1, 1 To 1): T(1, 1) = RngCol.Value
Else: T = RngCol.Value: End If
For L = 1 To UBound(T, 1)
T(L, 1) = CDate(Replace(T(L, 1), ".", "/"))
Next L
RngCol.Value = T
End Sub
Set RngCol = RngCol.Resize(RngCol(1000000, 1).End(xlUp).Row - RngCol.Row + 1)
Set RngCol = RngCol.Resize(Range("A" & Cells.Rows.Count).End(xlUp).Row - RngCol.Row + 1)