Bonjour BICE45, Salut massari59264,
J'ai également planché sur une solution en macro :
Sub EcrireListeProd()
Dim Lig As Long, Ntbl As Integer, Table() As String, CodeCompo As String, Ncompt As Long
With ActiveSheet
For Lig = 2 To .Range("A" & .Rows.Count).End(xlUp).Row 'Parcourir les lignes
If Not IsEmpty(.Cells(Lig, 1)) Then 'Si cellule A non vide
CodeCompo = .Cells(Lig, 1) 'On retient le Code composant
ReDim Table(1)
Table = Split(Replace(.Cells(Lig, 2), " ", ""), "+") 'On sépare le contenu en colonne B en fonction du "+"
For Ntbl = 0 To UBound(Table) 'On regarde chaque élément séparé
Ncompt = Sheets(2).Range("A" & .Rows.Count).End(xlUp).Row + 1 'On incrémente la ligne où écrire en feuille 2
If IsNumeric(Table(Ntbl)) Then 'Si l'élément est un nombre
Sheets(2).Cells(Ncompt, 1) = CodeCompo 'On reporte le code composant
Sheets(2).Cells(Ncompt, 2) = CInt(Table(Ntbl)) 'On reporte l'élément sans retouche
Else
If Table(Ntbl) Like "KIT*" Then 'Si il commence par "KIT"
Sheets(2).Cells(Ncompt, 1) = CodeCompo
Sheets(2).Cells(Ncompt, 2) = "KIT" & Application.Rept("0", 8 - Len(Table(Ntbl))) & Right(Table(Ntbl), Len(Table(Ntbl)) - 3) 'On ajoute après "KIT" autant de 0 que nécessaire pour atteindre 8 caractères
Else
Sheets(2).Cells(Ncompt, 1) = CodeCompo
Sheets(2).Cells(Ncompt, 2) = Application.Rept("0", 8 - Len(Table(Ntbl))) & Table(Ntbl) 'On ajoute au début autant de 0 que nécessaire pour atteindre 8 caractères
End If
End If
Next Ntbl
End If
Next Lig
End With
End Sub
Ici avec ton fichier :