Microsoft Excel 2007
Looping over collections exercise
Average difficulty

This Microsoft Excel 2007 LOOPING OVER COLLECTIONS exercise is provided to allow potential course delegates to assess their suitability for the Wise Owl EXCEL 2007 VISUAL BASIC course only, and may not be reproduced in whole or in part in any format without the prior written consent of Wise Owl.

Exercise: Looking for Wombles

A full answer to this exercise is provided as part of the training course!

1) Download the files needed to start this exercise: exercise-915.zip (and click here if you experience any problems unzipping this file after downloading it).
2) It's a windy day on Wimbledon Common, and Wombles don't weigh much.  Whatever you do, don't click on the button in this worksheet ...
Exercise screen-shot 2021 If you click on this button, who knows what might happen?
3) We did say not to click on the button!  Now you need to find all of the Wombles, by searching over the range Range("A1:CV100").  Your algorithm (steps to follow) should be:
  • For each cell in the above range ...
  • ... If the value of the cell is non-blank ...
  • ... write out the value of the cell to the immediate window using Debug.Print
4) Your final output will look something like this:
Exercise screen-shot 2022 Your Wombles will probably be in different places
5) Save this file as Wombles apart.xlsm, and close it down.

Thank you for showing an interest in this Excel 2007 Visual Basic training course! As mentioned above, full answers to this and other exercises are provided on the course. On all Wise Owl scheduled courses delegates can take away these model answers (together with their own efforts!) on a free USB stick.

All content copyright Wise Owl Business Solutions Ltd 2008.  All rights reserved..