Sub Totalisation()
Dim dl As Long, plage As Range
With Sheets("synthese")
dl = .Cells(.Rows.Count, 2).End(xlUp).Row
Set plage = .Range("C12:C" & dl)
.Cells(dl + 1, 2) = "Total"
.Cells(dl + 1, 3) = Application.WorksheetFunction.Sum(plage) 'somme fausse
.Cells(dl + 1, 4) = Application.WorksheetFunction.Sum(plage.Offset(0, 1)) 'somme juste
.Cells(dl + 1, 5) = .Cells(dl + 1, 4) - .Cells(dl + 1, 3)
'mise en forme
.Range(Cells(dl + 1, 2), Cells(dl + 1, 5)).Borders.Weight = xlThin
.Range(Cells(dl + 1, 2), Cells(dl + 1, 5)).Interior.ColorIndex = 9
.Range(Cells(dl + 1, 2), Cells(dl + 1, 5)).Font.ThemeColor = xlThemeColorDark1
.Range(Cells(dl + 1, 2), Cells(dl + 1, 5)).Font.Bold = True
.Cells(dl + 1, 4).NumberFormat = "#,##0.00 $"
.Cells(dl + 1, 4).NumberFormat = "#,##0.00 $"
.Cells(dl + 1, 5).NumberFormat = "#,##0.00 $"
End With
End Sub