Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim F1 As Worksheet, F2 As Worksheet, c As Range, t, dat As Date, i&, n&
Set F1 = Feuil2: Set F2 = Feuil3 'CodeNames des feuilles Facturation et Listes
Set c = Cells(26, ActiveCell.Column)
If ActiveCell.Row > 28 And IsDate(c) And ActiveCell.Interior.ColorIndex = xlNone Then
Application.Calculation = xlCalculationManual
Me.Unprotect "mdp" 'mot de passe à adapter
Columns("BJ").Resize(, Columns.Count - Columns("BJ").Column + 1).Validation.Delete
t = Intersect(F1.[A10].CurrentRegion, F1.[A:J]) 'matrice, plus rapide
dat = c
For i = 1 To UBound(t)
If t(i, 10) = dat Then n = n + 1: t(n, 1) = t(i, 1)
Next
F2.Columns(1).ClearContents 'RAZ
If n Then F2.[A1].Resize(n) = Application.Index(t, , 1)
F2.[A1].Resize(IIf(n, n, 1)).Name = "Listes"
ActiveCell.Validation.Add xlValidateList, Formula1:="=Listes"
Me.Protect "mdp" 'mot de passe à adapter
Application.Calculation = xlCalculationAutomatic
End If
End Sub