Subscriber only lesson.
Sign up to this course to view this lesson.
About this lesson
Basic looping including counting iterations and exiting.
Download this lesson’s exercise file.Loops: Basic looping with Do loops.xlsm
Loops: Basic looping with Do loops
Basic looping with Do loops.
When to use
To look at each item in a particular area, such as every row in a worksheet or every worksheet in a workbook
A loop will continuously perform an action defined in the Do statement.
If <test> = <result> Then
Hints & tips
- Failing to include a status test with an "Exit Do" statement will result in a loop that just runs forever
- If you do end up in this situation, press CTRL + BRK to break into debug mode
Lesson notes are only available for subscribers.