
Première macro qui supprime des lignes :


Sub sup_les_lignes()
Dim i As Integer
Application.ScreenUpdating = False
For i = Range("H" & Rows.Count).End(xlUp).Row To 18 Step -1
    If LCase((Range("H" & i))) <> Range("A10") And Range("H" & i) <> "" Then Rows(i).Delete
Next i
End Sub

Deuxième macro qui calcul la somme des commandes :

Sub somme_montants()
 dl = Cells(Rows.Count, "F").End(xlUp).Row
 For i = dl - 1 To 2 Step -1
 If Cells(i + 1, "F") = Cells(i, "F") Then
    Cells(i, "L") = Cells(i + 1, "L") + Cells(i, "L")
    Rows(i + 1).Delete shift:=xlUp
 End If
 Next i
End Sub
