Sub OK()
If [C4] = "" Or [D4] = "" Or [E4] = "" Then [C4:E4].Find("", [E4], xlValues).Select: Exit Sub
On Error Resume Next 'si la feuille n'existe pas
With Sheets(CStr([D4]))
If Err Then MsgBox "Créez la feuille '" & [D4] & "' !", 48: Exit Sub
If .FilterMode Then .ShowAllData 'si la feuille est filtrée
With .Cells(.Rows.Count, 1).End(xlUp)(2)
.Value = [C4]
.Offset(, 1) = [E4]
.Resize(, 2).Borders.Weight = xlThin 'bordures
End With
.[A:B].Sort .[A1], xlAscending, Header:=xlYes 'tri sur les dates
.Activate 'facultatif
End With
[C4:E4].ClearContents 'RAZ
End Sub