Sub Recap_Complet()
f = 1
i = 5
j = 2
r = 3
Sheets("Recap_Complet").Select
Cells.Select
Selection.Delete Shift:=xlUp
Application.Goto Reference:="Liste"
Selection.Copy
Sheets("Recap_Complet").Select
Range("A3").Select
ActiveSheet.Paste
Do While Sheets(f).Name <> "Recap_Complet"
Sheets("Recap_Complet").Cells(1, j) = Sheets(f).Name
Range(Cells(1, j), Cells(1, j + 1)).Select
Selection.HorizontalAlignment = xlCenter
Selection.Font.Bold = True
Selection.Merge
Cells(2, j) = "DEBIT"
Cells(2, j).Select
Selection.HorizontalAlignment = xlCenter
Cells(2, j + 1) = "CREDIT"
Cells(2, j + 1).Select
Selection.HorizontalAlignment = xlCenter
Do While Len(Cells(r, 1).Value) > 0
Sheets("Recap_Complet").Cells(r, j).Value = Application.WorksheetFunction.SumIf(Sheets(f).Range("G5:G100"), "=" & Sheets("Recap_Complet").Cells(r, 1), Sheets(f).Range("C5:C100"))
j = j + 1
Sheets("Recap_Complet").Cells(r, j).Value = Application.WorksheetFunction.SumIf(Sheets(f).Range("G5:G100"), "=" & Sheets("Recap_Complet").Cells(r, 1), Sheets(f).Range("D5:D100"))
r = r + 1
j = j - 1
Loop
f = f + 1
j = j + 2
r = 3
Loop
Cells.Select
Cells.EntireColumn.AutoFit
Range("A1").Select
End Sub