Hey guys, welcome back. So in this video we're going to discuss the due until structure. So I've got an example here. And it's actually the same code except that I've done it as do until loop instead of just to do loop a simple do loop. And here what we're going to do, we're going to select cell A one, and then we're just going to execute that code here, which is to go one cell down until the value of the active cell is equal to 10. As you can see here, in column A, I've written some numbers here between one and 27.
And if we try to execute this code, we'll first of all, select cell A one and then we're just gonna go one cell down until the value of the active cell is equal to 10. And then what happens when the value of the active cell is equal to 10, we stop and we exit the loop and we go to the end sub statement. And as you could notice here, we actually check for the condition first before executing the code which you Going one cell down. So this is the due until structure, if we switch that to a loop until structure, and we try to execute that code, so we're going to select cell A one and then we're going to go down one cell and then check for the condition go down one cell, check for the condition, not check for the condition and then go down one cell.
Okay, so this is the difference here. So as you can see here, we execute the code first, and then we check for our condition. And in some cases, depending on the scenario and what you're doing, the do until will be more efficient than the loop until okay, but this of course, depends on situation and what you're doing and your code and everything. So that's a simple example for the do until loop. Thank you very much for watching this video. I'll see you on the next one.