Select Page

Excel Video 429 introduces another way to loop through data with Do While Loops and Do Loops While. The difference between those two types of loops is where the While condition is. A Do While Loop may never run if the condition is never met, but a Do Loop While will always run at least once before the condition is checked.
My example is very basic, but you can use this principle to run code while there is data, while there are rows and columns, or while a statement is true or false. Be careful as you play with loops. You can easily send Excel off into a never-ending loop. If you do, CTRL+BREAK will get you out of the endless loop.
There’s a similar kind of loop called a Do Until Loop, with a related Do Loop Until. I’ll discuss those in the next Excel Video. Thanks for watching.