Dim i As Integer Dim j As Integer Dim n As Integer Dim nobs As Integer
Cells(1, 1) = "試行回数" n = 3 nobs = 10 For j = 1 To n For i = 1 To nobs Cells(i + 1, j + 1).Formula = "=randbetween(1,6)" Next Cells(nobs + 3, j + 1).Formula = "=Average(Range(Cells(2, j+1), Cells(2+nobs-1, j+1)))" Next End Sub --------------- 【注】 randbetween(1,6) エラーの場合 rand()で置き換えてお願いします.