From the course: Excel: Macros in Depth (Microsoft 365)
Unlock the full course today
Join today to access over 22,500 courses taught by industry experts or purchase this course individually.
Using Do While and Do Until statements
From the course: Excel: Macros in Depth (Microsoft 365)
Using Do While and Do Until statements
- [Instructor] In the previous movie, we introduced the concept of a for loop, a structure that allows us to repeat an action, or a series of actions multiple times. Another variation is what we call a do loop, probably more often than a for loop, and it's got more flexibility. In this workbook here, we have the same sheets that we saw in the previous movie, a short list, 42 rows, a September list and October list, some 2,500 rows. We'd like to be able to use the same kind of structure, but stress the idea that no matter how big the list is, we could be using a do loop instead of a for loop. I'm going to press Alt F11 to remind you what we did in the previous movie. We recognized that we had a serious of actions, we recorded them, we took away the repetitious code, and essentially, by using this for structure said, perform those actions seven times to deal with that short list. Short list has only 42 rows, six bits of…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.