Bonsoir,
Re-, Mytå
D'après ce que j'ai compris......
Regarde le fichier joint, à toi de modifier, notamment au niveau des titres, et/ou des colonnes de récupération des données...
Les codes (j'ai un peu modifié ta fonction initiale)
Function ListeNbr(champ As Range, Nbr As Long)
Application.Volatile
For Each c In champ
If c = Nbr Then temp = temp & c.Address(RowAbsolute:=False, ColumnAbsolute:=False) & ","
Next c
If temp <> "" Then ListeNbr = Left(temp, Len(temp) - 1)
End Function
Sub liste_nbr()
Dim Cel As Range, Plg As Range
Columns("C:D").Clear
Range("B3:C3").Value = "Titre": Range("D3").Value = "Cellules"
Set Plg = Range("B3:B" & Cells(Rows.Count, "B").End(xlUp).Row)
Plg.AdvancedFilter Action:=xlFilterCopy, _
CopyToRange:=Range("C3"), Unique:=True
For Each Cel In Range("C4:C" & Cells(Rows.Count, "C").End(xlUp).Row)
Cel.Offset(, 1).Formula = "=ListeNbr(" & Plg.Address & "," & Cel.Value & ")"
Next Cel
End Sub
Le fichier :
Bonne soirée