Mega Code Archive

 
Categories / VisualBasic Script / Excel
 

Set cell value with For Loop

Sub RangeObjects()    Dim i As Integer, j As Integer    For i = 1 To 10       For j = 1 To 5          Cells(i, j).Value = i * j       Next j    Next i End Sub