From the course: Excel: Learning VBA

Unlock the full course today

Join today to access over 24,500 courses taught by industry experts.

Challenge: Add logic to your code

Challenge: Add logic to your code - Microsoft Excel Tutorial

From the course: Excel: Learning VBA

Challenge: Add logic to your code

(bright music) - [Narrator] Now that we've reached the end of the chapter, I would like to offer you some challenges to use the skills that you've learned, and these will relate to adding a logic to your VBA code. So there's a couple of challenges, and here's the first one. I will ask you to define a for next loop to repeat instructions within a subroutine. Then I will ask you to display each member of an array using a for each loop. Finally, I will ask you to create an if then statement that allows you to create a condition where something either will be done or it won't be done. As always, there are three elements to the challenge. First, prepare, read the comments in each code module to learn about the challenge. Secondly, create your solution by adding or editing the existing code to create a solution that meets the challenge. And finally third, test your solution by running your code to make sure it works as expected.…

Contents