Sub USDates() 'touches Ctrl+J
'---Colonne J au format date correct---
Dim lig As Long, txt As String
For lig = 3 To Range("J65536").End(xlUp).Row
txt = Cells(lig, 10).Text
txt = Mid(txt, 4, 2) & "/" & Left(txt, 2) & "/" & Mid(txt, 7, 4)
Cells(lig, 10) = Format(txt, "mm/dd/yyyy")
Next
End Sub
Sub RecoleDates() 'touches Ctrl+R
'---Supprime les lignes dont les dates ne sont pas recolées---
Dim N As Byte, F As Object, col As Byte, derlig As Long, lig As Long, i As Byte, Ndate As Byte
N = Application.Min(255, 3 * Int(Val(InputBox("Nombre de valeurs boursières à recoler :", "Recolement"))))
If N = 0 Then Exit Sub
Application.ScreenUpdating = False
Set F = Sheets("Feuil1") 'feuille copiée
Sheets("Recolement").Activate 'feuille de recopie
Cells.Clear
F.Range(F.Columns(1), F.Columns(N)).Copy Range("A1")
For col = 1 To N Step 3
derlig = Cells(65536, col).End(xlUp).Row
For lig = derlig To 3 Step -1
Ndate = 0
For i = 1 To N Step 3
Ndate = Ndate + Application.CountIf(Columns(i), Cells(lig, col))
Next i
If Ndate <> N / 3 Then Cells(lig, col).Resize(, 3).Delete Shift:=xlUp
Next lig
Next col
End Sub