re,
@Curulis57 et en essayant d'utiliser la même méthode, une variante
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
'
Dim Dic, tTab, tData, iIdx%
'
Cancel = True
Set Dic = CreateObject("scripting.dictionary")
Dic.comparemode = vbTextCompare
tData = [REF].Cells.Value
tTab = Range("B3:H11").Value
'
If Not Intersect(Target, Range("K2:O2")) Is Nothing Then
iIdx = Target
Range("K3:O11").ClearContents
Range("K3:O11").Interior.ColorIndex = xlColorIndexNone
Range("K3").Resize(9, iIdx).Interior.Color = RGB(50, 200, 50)
For x = 1 To UBound(tTab, 1)
Dic.RemoveAll
For i = 1 To UBound(tData, 2): Dic(tData(1, i)) = vbEmpty: Next 'ajouter les tDatas
N = Dic.Count 'nombre de ces tDatas uniques
For i = 1 To UBound(tTab, 2)
If tTab(x, i) <> "" Then Dic(tTab(x, i)) = vbEmpty
Next 'ajouter les dTabs
For i = N To 1 Step -1: Dic.Remove Dic.keys()(i - 1): Next 'supprimer les (premiers) tDatas (séquence reverse !)
If Dic.Count <= iIdx Then
For i = 1 To Dic.Count
Cells(2 + x, 10 + i) = Dic.keys()(i - 1)
Next
'Cells(2 + x, 11).Resize(, Dic.Count) = Dic.keys 'sinon, en 1 fois
End If
Next
End If '
End Sub