Private Sub AjourIngrdt()
Dim Cel As Range, Index&, L As Integer, Tbl As Variant, TblI As Variant
Dim Li As Integer
Set RgIngrdts = F4.Range("A2", F4.Range("A65536").End(xlUp))
Set Cel = RgIngrdts.Find(LabID)
If Cel Is Nothing Then Exit Sub
Do While Cel = LabID 'compte
L = L + 1
Set Cel = Cel.Offset(1, 0)
Loop
ReDim Tbl(1 To L, 1 To 4)
Set Cel = RgIngrdts.Find(LabID)
If Cel Is Nothing Then Exit Sub
L = 0
Do While Cel = LabID 'rempli
L = L + 1
Tbl(L, 1) = Cel(1, 3) 'listingid
Tbl(L, 2) = Cel(1, 3) 'listingid
Tbl(L, 3) = Cel(1, 4) 'quantité
Tbl(L, 4) = Cel(1, 5) 'unité
Set Cel = Cel.Offset(1, 0)
Loop
TblI = F5.Range("A2:C" & F5.Range("A65536").End(xlUp).Row)
For L = 1 To UBound(Tbl, 1)
For Li = 1 To UBound(TblI, 1)
If Tbl(L, 2) = TblI(Li, 1) Then 'compare listingid
Tbl(L, 2) = TblI(Li, 2) 'remplace listingid par ingrédient
Exit For
End If
Next Li
Next L
With ListBoxIngrdts
.Clear
.ColumnCount = 4
.ColumnWidths = "0;140;30;30"
.List = Tbl
.ListIndex = -1
End With
End Sub