Trevor has attended:
Excel Advanced course
Excel VBA Intro Intermediate course
Access Intermediate course
Excel VBA Advanced course
VBA
What is a nested loop?
RE: VBA
Hi Trevor
Thank you for the question. A nested loop is when one loop contains another loop. The example below has a loop for the columns and a loop to do each row in each column.
Sub Square100()
Dim iRowNum As Integer
Dim iColNum As Integer
For iColNum = 0 To 9
For iRowNum = 1 To 10
ActiveCell.Offset(iRowNum, iColNum).Value = iColNum * 10 + iRowNum
Next iRowNum
Next iColNum
End Sub
I hope that explains enough.
Laura GB