Sub inserelignesousconditions()
'
' inserelignesousconditions Macro
' Macro enregistrée le 05/10/2009 par Customer
'
'
Dim Vintitulé As Range
Dim Plage As Range
Dim i As Integer
[COLOR="red"]With Worksheets[/COLOR]
For i = 1 To 500 'comment alléger ppour faire référence à dernière ligne de la plage
'activer toutes les feuilles pour que cela s'opère dans toutes les feuilles
Set Plage = Range("a1:a65536").End(xlUp)
For Each Vintitulé In Plage
If Vintitulé(i, 1).Value = "707900" Then
Cells(Vintitulé(i).Row + 1, 1).EntireRow.Insert Shift:=xlDown
Cells(Vintitulé(i).Row + 1, 1) = "Total1"
ElseIf Vintitulé(i, 1).Value = "606500" Then
Cells(Vintitulé(i).Row + 1, 1).EntireRow.Insert Shift:=xlDown
Cells(Vintitulé(i).Row + 1, 1) = "Total2"
ElseIf Vintitulé(i, 1).Value = "607000" Then
Cells(Vintitulé(i).Row + 1, 1).EntireRow.Insert Shift:=xlDown
Cells(Vintitulé(i).Row + 1, 1) = "Total3"
End If
Next Vintitulé
Next i
[COLOR="Red"]End With[/COLOR]
End Sub