Post this Blog to facebook Add this Blog to del.icio.us! Digg this Blog furl this Blog Add this Blog to Reddit Add this Blog to Technorati Add this Blog to Newsvine Add this Blog to Windows Live Add this Blog to Yahoo Add this Blog to StumbleUpon Add this Blog to BlinkLists Add this Blog to Spurl Add this Blog to Google Add this Blog to Ask Add this Blog to Squidoo

Mar 23, 2007

Revisiting Ranges in VBA for Excel

If you think back over what you use Excel for, you will realize that a lot of the time you want to treat the spreadsheet as a collection of cells in an array. Whether it is for colorizing cells based on their value, filling in a data sheet of values, or just trying to create a visually appealing sheet, moving through ranges of cells is a must.

This week, I took the bull by the horns and tried to sum up my experiences in the Excel VBA tutorial How to Loop through Call Ranges in Excel. It deals with cases where you:

  • Know the number of cells to loop through;
  • Don't know the number of cells to loop through;
  • Want to use a user-defined 'end marker'.

It is a really useful guide to have around when you are trying to build a macro or VBA script that has to loop through all the cells in a range. There are probably other ways to add to the list, and if your favorite is not listed, then drop me a line - computerprogramming@suite101.com - I'll be glad to add it, and you'll be helping others along into the bargain!

Happy scripting!