Private Sub CommandButton1_Click()
Dim x As Integer
Dim y As Integer
Dim a As Integer
For Each w In Range("A1,A3,A5,A7")
If w > 0 Then x = x + 1 Else
If w < 0 Then z = z + 1
Next w
a = x + z
Range("B1").Value = "Négatifs " & z * 100 / a & " %"
Range("B2").Value = "Positifs " & x * 100 / a & " %"
Call Pairs
End Sub
Private Sub Pairs()
Dim x As Integer
Dim y As Integer
Dim a As Integer
For Each w In Range("A2,A4,A6,A8")
If w > 0 Then x = x + 1 Else
If w < 0 Then z = z + 1
Next w
a = x + z
Range("B3").Value = "Négatifs " & z * 100 / a & " %"
Range("B4").Value = "Positifs " & x * 100 / a & " %"
End Sub