A loop in VBA code allows us to repeat an action a set number of times. So, rather than having to repeat the same line of code 10 times or 100 times, or however many is desired, it can be wrapped in a looping structure instead. The most common such loops are the For ... Next and the Do ... Loop. For example: Sub ForNextLoop() Dim iCounter as Integer For iCounter = 1 to 10 Range("A" & iCounter).Value = iCounter Next End Sub