Option Explicit
Sub Opérations_présentation()
Dim Plage As Range
Dim c As Range
Application.ScreenUpdating = False
Set Plage = Range("a10").CurrentRegion
For Each c In Plage
c.Replace "EUR15", ""
c.Replace "EUR27", ""
c.Replace "", 0
Next
Range("z10") = "Total €"
Range("aa10") = "Total Kg"
Range("ab10") = "€ / Kg"
Range("z12:z" & Range("y65536").End(xlUp).Row).FormulaR1C1 = "=SUM(RC[-24],RC[-22],RC[-20],RC[-18],RC[-16],RC[-14],RC[-12],RC[-10],RC[-8],RC[-6],RC[-4],RC[-2])"
Range("aa12:aa" & Range("y65536").End(xlUp).Row).FormulaR1C1 = "=SUM(RC[-24],RC[-22],RC[-20],RC[-18],RC[-16],RC[-14],RC[-12],RC[-10],RC[-8],RC[-6],RC[-4],RC[-2])"
Range("ab12:ab" & Range("y65536").End(xlUp).Row).FormulaR1C1 = "=RC[-2]/RC[-1]"
With Columns("ab:ab")
.NumberFormat = "#,##0.00"
.SpecialCells(xlCellTypeFormulas, 16).EntireRow.Delete
End With
Range("a12").End(xlDown).Offset(1, 0).Name = "total"
With Range("total")
.Value = "TOTAL"
.Offset(, 1).FormulaR1C1 = "=SUM(R[-10]C:R[-1]C)"
.Offset(, 1).AutoFill Destination:=Range("total").Offset(, 1).Resize(, 26), Type:=xlFillDefault
.Offset(, 27).Value = "Sans objet"
End With
Range("a10").CurrentRegion.Borders.Value = 1
With Range("Z10:AB11,total")
.Font.Bold = True
.HorizontalAlignment = xlCenter
.Interior.ColorIndex = 36
End With
With Range("Z10:Z11,AA10:AA11,AB10:AB11")
.Merge
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlCenter
End With
ActiveWorkbook.Names("total").Delete
Application.ScreenUpdating = True
End Sub