Private Sub Worksheet_Change(ByVal Target As Range)
Dim rech, source As Range, tablo, ncol%, resu, i&, n%, j%, h&
With [J7] 'à adapter
If Intersect(Target, .Cells) Is Nothing Then Exit Sub 'à adapter
rech = .Value
End With
Set source = [A6].CurrentRegion 'à adapter
tablo = source 'tableau VBA, plus rapide
ncol = UBound(tablo, 2)
Application.ScreenUpdating = False
If FilterMode Then ShowAllData 'si la feuille est filtrée
With [K8] 'à adapter
With .Resize(Rows.Count - .Row + 1, 3)
.ClearContents 'RAZ
.Borders.LineStyle = xlNone
resu = .Value 'tableau VBA, plus rapide
End With
For i = 1 To UBound(tablo)
n = 0
For j = 2 To ncol
If tablo(i, j) = rech Then
If source(i, j).Interior.ColorIndex = xlNone Then 'si la cellule est incolore
n = n + 1
If n = 1 Then h = h + 1: resu(h, 1) = tablo(i, 1): resu(h, 3) = tablo(i, ncol)
End If
End If
Next j
If n Then resu(h, 2) = n
Next i
If h Then
.Resize(h, 3) = resu
.Resize(h, 3).Borders.Weight = xlThin
End If
End With
End Sub