Skip to content

Instantly share code, notes, and snippets.

@taka2
Created April 13, 2010 02:48
Show Gist options
  • Select an option

  • Save taka2/364264 to your computer and use it in GitHub Desktop.

Select an option

Save taka2/364264 to your computer and use it in GitHub Desktop.
' バルクセット
Sub hoge()
numcols = 100
numrows = 1000
Dim arr1
ReDim arr1(numrows - 1, numcols - 1)
For i = 0 To numrows - 1
For j = 0 To numcols - 1
arr1(i, j) = i * j
Next
Next
Set myRange = Range(Cells(1, 1), Cells(numrows, numcols))
myRange.Value = arr1
End Sub
' 1セルごとにセット
Sub hoge2()
numcols = 100
numrows = 1000
For i = 0 To numrows - 1
For j = 0 To numcols - 1
Cells(i + 1, j + 1).Value = i * j
Next
Next
End Sub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment