From the course: Excel for Engineering Professionals

Unlock the full course today

Join today to access over 23,200 courses taught by industry experts.

Loops: For...Next and Do...Loop

Loops: For...Next and Do...Loop

- [Instructor] Data is plural. After all, your solar panel production line doesn't produce just one panel. It produces many of them. If you need to model your distillation process, you might want to create something that steps the McCabe-Thiele diagram to determine the theoretical number of plates in the tower. Similarly, if you recorded your actions in Excel, the macro will perform them only once, but more often than not you need it to repeatedly do something. Many Excel users who start editing their macros, ask questions like, how do I run this macro on all worksheets like we see in this slide? Or how do I run this macro on all cells until an empty cell is encountered? This is where loops come in handy and I'm going to explain three kinds of them. Counter loops, collection loops, and conditional loops. The first type of loops I wanted to discuss with you are the counted loops. By using a counter, a set of statements is…

Contents