montecarlo2012
Well-known Member
- Joined
- Jan 26, 2011
- Messages
- 984
- Office Version
- 2010
- Platform
- Windows
Hello. what kind of reasoning I have to apply, to understand how from the simple loop code here:
how to populate a row with something like this:
<tbody>
</tbody>
<tbody>
</tbody>
Code:
[SIZE=3][COLOR=#000000][FONT=Calibri]Sub looptest()<o:p></o:p>[/FONT][/COLOR][/SIZE]
[SIZE=3][COLOR=#000000][FONT=Calibri]Dim i As Integer, j As Integer<o:p></o:p>[/FONT][/COLOR][/SIZE]
[SIZE=3][COLOR=#000000][FONT=Calibri] For i = 1 To 6<o:p></o:p>[/FONT][/COLOR][/SIZE]
[SIZE=3][COLOR=#000000][FONT=Calibri] For j = 1 To 6<o:p></o:p>[/FONT][/COLOR][/SIZE]
[SIZE=3][COLOR=#000000][FONT=Calibri]Cells(i, j).Value = i * j<o:p></o:p>[/FONT][/COLOR][/SIZE]
[SIZE=3][COLOR=#000000][FONT=Calibri] Next j<o:p></o:p>[/FONT][/COLOR][/SIZE]
[SIZE=3][COLOR=#000000][FONT=Calibri] Next i<o:p></o:p>[/FONT][/COLOR][/SIZE]
[SIZE=3][COLOR=#000000][FONT=Calibri]End Sub<o:p></o:p>[/FONT][/COLOR][/SIZE]
2/B3:G20 | 3/B4:G21 | 4/B5:G22 | 5/B6:G23 | 6/B7:G24 | 7/B8:G25 |
<tbody>
</tbody>
is an excel recipe, or there are a logic explanation. |
<tbody>
</tbody>
Last edited: