Merci pour cette réponse.Bonjour
avec un tableau
Dim TabData(1 to 3,1 to 3) as integer
Sub Exemples()
Matrice 17, 3, 1, 50
MatriceFigee 30, 5, 1, 1600
End Sub
Sub Matrice(LIG, COL, vMin, vMax)
[A1].Formula2R1C1 = "=RANDARRAY(" & LIG & "," & COL & "," & vMin & "," & vMax & ",TRUE)"
End Sub
Sub MatriceFigee(LIG, COL, vMin, vMax)
[E1].Resize(LIG, COL) = Application.WorksheetFunction.RandArray(LIG, COL, vMin, vMax, True)
End Sub