Bonjour,
Je ne vois pas que tu aies mis le dernier code proposé.
Donc le ce que j'ai avec ta macro est faux.
Cependant comme pour moi il y a avait autant de factures que de lignes, le montant HT apparaissait plusieurs fois. Voici une autre proposition avec le montant HT en haut (c'est plus simple) :
Sub dupliquerLig()
Dim lig As Long, col As Long, nblig As Long, montant As Double
Application.ScreenUpdating = False
For lig = Cells(Rows.Count, "A").End(xlUp).Row To 2 Step -1
nblig = Application.CountA(Cells(lig, "F").Resize(1, 4))
If nblig > 1 Then
For col = 9 To 6 Step -1
If Cells(lig, col) <> 0 Then
montant = Cells(lig, col)
Rows(lig).Copy
Rows(lig + 1).Insert Shift:=xlDown
Cells(lig + 1, "F").Resize(1, 4).ClearContents
Cells(lig + 1, col) = montant
Cells(lig + 1, "D") = ""
End If
Next col
If lig <> 2 Then Rows(lig).Delete
Else
Cells(lig, "D") = ""
End If
If lig = 2 Then
Cells(lig, "F").Resize(1, 5).ClearContents
End If
Next lig
Application.CutCopyMode = False
Application.ScreenUpdating = True
End Sub
eric