Sub DateFilter()

Range("D2:D1048576").Select
    Selection.NumberFormat = "m/d/yyyy"
    Range("D2").Select

Dim i As Long
Dim NbLig As Long

'Dernière ligne
NbLig = Range("D" & Rows.Count).End(xlUp).Row

'Demande la date de début
Dim DateDebut As Date
DateDebut = InputBox("Date de début :", "")
 
'Demande la date de fin
Dim DateFin As Date
DateFin = InputBox("Date de fin :", "")
 
'Affiche le choix des dates
MsgBox "Votre choix: de " & DateDebut & " à " & DateFin & ""
 
 
'Efface les lignes hors date
   For i = NbLig To 1 Step -1
        If Cells(i, 4).Value < DateDebut Or Cells(i, 4) > DateFin Then
            Rows(i).Delete shift:=xlUp
        End If
   Next i

End Sub