Option Explicit
Sub Formules_rétablir()
With Application: .ScreenUpdating = False: .Calculation = xlManual: .EnableEvents = False: End With
Sheets("S34").Activate
Range("B1").FormulaR1C1 = "=COUNTIF(R[2]C:R[599]C,""<>"")" '
Range("V1").FormulaR1C1 = "=SUBTOTAL(9,R[2]C:R[349]C)"
Range("W1").FormulaR1C1 = "=SUBTOTAL(9,R[2]C:R[349]C)"
Range("X1").FormulaR1C1 = "=SUBTOTAL(2,R[2]C:R[349]C)"
Range("Y1").FormulaR1C1 = "=SUBTOTAL(9,R[2]C:R[349]C)"
Range("Z1").FormulaR1C1 = "=SUBTOTAL(9,R[2]C:R[349]C)"
Range("AA1").FormulaR1C1 = "=SUBTOTAL(9,R[2]C:R[349]C)"
Range("Y3:Y" & Cells(Rows.Count, 24).End(xlUp).Row).FormulaR1C1 = "=IF(RC[-1]="""",(""""),RC[-1]-RC[-19])"
Range("Y3").FormulaR1C1 = "=IF(RC[-1]="""",(""""),RC[-1]-RC[-19])"
With Application: .EnableEvents = True: .Calculation = xlAutomatic: .ScreenUpdating = True: End With
End Sub