Private Sub Worksheet_Change(ByVal Target As Range)
Dim Recherche As Range, P As Range, Dates As Range, c As Range, Q As Range, R As Range
Set Recherche = [T11:Y11]
Set P = [E:J]
Set Dates = [D:D]
If Intersect(Target, Recherche) Is Nothing Then Exit Sub
Application.ScreenUpdating = False
On Error Resume Next 'si aucune SpecialCell
Recherche.Offset(1).Resize(Rows.Count - Recherche.Row, Recherche.Columns.Count + 1).Delete xlUp 'RAZ
For Each c In Recherche
If c <> "" Then
P.Replace c, "#N/A", xlWhole
Set Q = Nothing
Set Q = P.SpecialCells(xlCellTypeConstants, 16)
If Q Is Nothing Then Exit Sub
Q = c
Set Q = Intersect(Q.EntireRow, P)
If R Is Nothing Then Set R = Q Else Set R = Intersect(Q, R)
If R Is Nothing Then Exit Sub
End If
Next
'---résultat---
R.Copy Recherche(2, 1)
Intersect(R.EntireRow, Dates).Copy Recherche(2, Recherche.Columns.Count + 1)
End Sub