
Sub mediareale()
Dim i As Integer, j As Integer, sommasingolo As Double, sommapartita As Double, risultato As Double
For i = 6 To 35
sommasingolo = 0
sommapartita = 0
For j = 4 To 25
If Cells(i, j) <> "" Then
sommasingolo = sommasingolo + Cells(i, j)
sommapartita = sommapartita + Cells(5, j)
End If
Next
risultato = sommasingolo / sommapartita * 100
Cells(i, 28) = risultato
Next
End Sub |
