Option Explicit
Option Base 1
Sub moymob9()
Dim i As Integer, n As Integer, a As Integer
Dim tableau() As Double
Dim plage As Variant
Worksheets("feuil1").Select
Set plage = Range(Cells(2, 2), Cells(2, 2).End(xlDown))
'compte le nombre de cellules de la plage
n = WorksheetFunction.Count(plage)
ReDim tableau(n, 1)
For i = 10 To n Step 9
tableau(i, 1) = WorksheetFunction.Average(Cells(i - 8, 2), Cells(i, 2))
Next i
Worksheets("resultats").Activate
Columns(1).Clear
a = 1
For i = 1 To n Step 9
Cells(a, 1).Value = tableau(i, 1)
a = a + 1
Next i
End Sub