I'm trying to sum all the numbers in each row and column. I tried to do as below, but it is not working.
ranger .ClearContents
For n = 1 To 10
For Z = 1 To 10
Cells(Z, n) = Int(100 * Rnd())
k = Cells(n, Z)
If Int(k / 2) - k / 2 = 0 Then
pares = pares + 1
Else
Impares = Impares + 1
End If
If k = 0 Then Zeros = Zeros + 1
If k > 10 Then MaioresQuedez = MaioresQuedez + 1
Cells(12, 2) = pares & " números Pares"
Cells(14, 2) = Impares & " números Ímpares"
Cells(16, 2) = Zeros & " números Zero"
Cells(18, 2) = MaioresQuedez & " números maiores do que 10"
next z
next n
Can anyone help me? Thank you.