bonsoir Alain
dans l'exemple joint :
à chaque saut de page une nouvelle ligne est insérée pour afficher le sous total de la page ( cellules en rouge )
le total est inséré en bas de colonne (cellule bleue )
les données doivent etre dans la colonne A
Sub TotalSautDePage()
Dim i As Byte
Dim DerLigne As Integer, Ligne As Integer, Pge As Integer
Dim Total As Double
Ligne = 1
DerLigne = Range("A65536").End(xlUp).Row
ActiveSheet.HPageBreaks.Add Before:=Cells(DerLigne + 1, 1)
Total = Application.WorksheetFunction.Sum(Range("A1:A" & DerLigne))
Application.ScreenUpdating = False
For i = 1 To ActiveSheet.HPageBreaks.Count
Pge = ActiveSheet.HPageBreaks(i).Location.Row
Rows(Pge).Insert
With Cells(Pge, 1)
.Value = Application.WorksheetFunction.Sum(Range("A" & Ligne & ":A" & Pge - 1))
.Interior.ColorIndex = 3
End With
Ligne = Pge + 1
Next i
With Cells(Pge + 1, 1)
.Value = Total
.Interior.ColorIndex = 5
End With
Application.ScreenUpdating = True
End Sub
bonne soiree
MichelXld