Okay guys, so now we're going to have a simple example for the do while loop. So we're going to do the same actually as what we were doing on the example for the doing till. So here I've got some code and it's going to select cell A one, and then while the value of the active cell is less than 10, we're actually going to go one step down, or one cell down. So as long as the value of the active cell is less than 10, we're just gonna keep on going one step down. So if I execute this code using f8, I'm first going to select cell A one and then I'm going to check and as long as the value of the cell is less than 10, we're going to keep on going one step down. So now here we are on cell A 10, that contains the value of 10.
So here, this condition is not going to be satisfied because the value of the active cell is not less than 10 because it's currently 10. So it's not less than 10. So we're going to exit the loop and execute the end. So now if we switch To the do loop while structure. So here, if I execute this code, you can see here that we actually, instead of checking for the condition first and then executing the code, we execute the code first and then we check for the condition, we're going to get the same result in this case, but in some other cases, using the do while structure is better than using the do loop. While structure it all depends on your code and what you're trying to achieve.
And so but in a lot of cases using do while loop is better than using do loop while okay. So this was a simple example for the do while loop. Thank you very much for watching this video. I'll see you on the next one.