Je dois rajouter les
Range("J" & i).Value = cumul1
Etc..
For i = 7 To derligne Step 2 ' on additionne toutes les lignes impaires
cumul = cumul + Cells(i, "I").Value
'cumul2 = cumul2 + Cells(i, "J").Value
'cumul3 = cumul3 + Cells(i, "L").Value
'cumul4 = cumul4 + Cells(i, "M").Value
Next i
Range("I" & i).Value = cumul
End Sub
Ok comme cela ça marche
va falloir faire la même chose pour les %...??
Sub Compteur()
Dim derligne As Integer
derligne = Range("A65536").End(xlUp).Row - 1 'cherche la ligne da la colonne A qui est juste avant 'Total"
cumul = 0
cumul2 = 0
cumul3 = 0
cumul4 = 0
For i = 7 To derligne Step 2 ' on additionne toutes les lignes impaires
cumul = cumul + Cells(i, "I").Value
cumul2 = cumul2 + Cells(i, "J").Value
cumul3 = cumul3 + Cells(i, "L").Value
cumul4 = cumul4 + Cells(i, "M").Value
Next i
Range("I" & i).Value = cumul
Range("J" & i).Value = cumul2
Range("L" & i).Value = cumul3
Range("M" & i).Value = cumul4
End Sub