Private Sub Worksheet_Change(ByVal Target As Range)
'---Création de la liste des noms sans doublons---
If Target.Column = 1 Then
Dim d, cel As Range
Set d = CreateObject("Scripting.Dictionary")
For Each cel In Range("A6", [A65536].End(xlUp))
If Not d.exists(cel.Value) Then d.Add cel.Value, cel.Value
Next
[Q:Q].ClearContents
[Q1].Resize(d.Count) = Application.Transpose(d.Items)
[COLOR="Red"][Q:Q].Sort Key1:=[Q1], Order1:=xlAscending, Header:=xlNo[/COLOR]
End If
If Target.Address = "$C$3" Then
Dim v, tablo(1 To 16), i As Long, j As Byte, ref As Range
v = Application.Match(Target, [A6:A65536], 0)
If IsError(v) Then Exit Sub
'---Constitution du tableau---
tablo(1) = Target
For i = v + 5 To [A65536].End(xlUp).Row
If Cells(i, 1) = Target Then
tablo(2) = Cells(i, 2)
tablo(3) = Cells(i, 3)
tablo(16) = Cells(i, 16)
For j = 4 To 15
tablo(j) = tablo(j) + Cells(i, j)
Next
End If
Next
'---Transfert en Feuil2---
Set ref = Sheets("Feuil2").[A5:A65536].Find(Target, LookIn:=xlValues, LookAt:=xlWhole)
If ref Is Nothing Then Set ref = Sheets("Feuil2").[A65536].End(xlUp)(2)
ref.Resize(, 16) = tablo
End If
End Sub