rebonjour,
Sub conso()
Dim dl&, dlws&, i&, k& 'long
Dim uc$, site$, da$, libda$ 'string
Dim ws As Worksheet
Dim debit As Currency, credit As Currency
With Sheets("feuil1")
dl = .Cells(Rows.Count, 1).End(xlUp).Row
k = dl
For Each ws In Worksheets
If ws.Name <> .Name Then
uc = ws.Range("B10")
If InStr(ws.Range("B9"), " / ") > 0 Then
site = Split(ws.Range("B9"), " / ")(1)
Else
site = ws.Range("B9")
End If
da = ws.Range("D9")
libda = ws.Range("D10")
dlws = ws.Cells(Rows.Count, "L").End(xlUp).Row
For i = 15 To dlws
Select Case ws.Cells(i, "L")
Case "", "TOTAL", "TOTAL HT"
Case Else
debit = ws.Cells(i, "M")
credit = ws.Cells(i, "N")
If debit <> 0 Or credit <> 0 Then
k = k + 1
.Cells(k, 3) = uc
.Cells(k, 1).Resize(, 2) = Application.Trim(site)
.Cells(k, 1).Resize(, 2).numberformat = "00000"
.Cells(k, 5) = ws.Cells(i, "L")
If debit <> 0 Then .Cells(k, 9) = debit
If credit <> 0 Then .Cells(k, 10) = credit
.Cells(k, 16) = ws.Cells(i, "O")
.Cells(k, 15) = da
.Cells(k, 15).NumberFormat = "0000000"
.Cells(k, 11) = libda
.Cells(k, 13) = .Cells(k, 5)
End If
End Select
Next i
End If
Next
End With
End Sub