Sub Test_OK()
Dim f As Worksheet
Set f = Sheets("Base_Historisation")
'Copie lignes Tableau_RAR vers Historisation
Dim tablo1, i&, tablo2(), n&
tablo1 = Sheets("RAR").Range("A10:Q" & Sheets("RAR").[q65536].End(xlUp).Row)
n = 0 'ajout initialisation explicite de n
For i = 1 To UBound(tablo1)
If tablo1(i, 9) = 1 Then
ReDim Preserve tablo2(16, n)
For j = 1 To 16 'ajout boucle
tablo2(j - 1, n) = tablo1(i, j) 'Modif pour incrémentation
Next j 'ajout boucle
n = n + 1
End If
Next i 'ajout i
If n Then
f.Cells(Rows.Count, 1).End(3)(2).Resize(n, 16) = Application.Transpose(tablo2)
End If
End Sub