Option Explicit
Global c As Range
Sub actualisation_pnl()
Dim nbrligne As Integer
Dim lig As Variant
Dim y, z, a, az As Integer
'initialise les valeurs
nbrligne = 0
a = 1
'défini la zone à sélectionner
Set c = ActiveSheet.Cells.Find("Intitulé", LookIn:=xlValues, lookat:=xlWhole)
Range(c, c).CurrentRegion.Select
'compte le nombre de ligne utiles
For Each lig In Selection.Rows
If Application.CountA(lig) > 0 Then nbrligne = nbrligne + 1
Next
'Réduit ce nombre de 2, ce qui correspond aux entêtes
If Not c Is Nothing Then
nbrligne = nbrligne - 2
'Intègre les calculs
For a = 1 To nbrligne
c.Offset(a, 1).FormulaR1C1 = "=5"
Next a
c.Offset((nbrligne + 1), 1).FormulaR1C1 [COLOR="SeaGreen"]= "=SUM(R[-[/COLOR][b][COLOR="Red"][11][/COLOR][/B][COLOR="seagreen"]C:R[-1]C)"[/COLOR]
End If
End Sub