From the course: Excel: Learning VBA

Unlock the full course today

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

Define arrays

Define arrays

- [Instructor] Most of the variables you create in Excel VBA will hold single values. That could be an item price or a shipping rate. However, you will often also deal with sets of values of the same type, such as multiple shipping rates. You can do that by creating a data structure called an array. In this movie, I will show you several ways that you can create and work with arrays. My sample file is "02_06_Arrays". And you can find it in the Chapter Two folder of the Exercise Files collection. This workbook contains two worksheets, and for one I have different shipping costs based on the maximum weight of a package. And then on sheet two, I have the same thing except now I have maximum weight for a package and also the zone where it's going. So, you might think of this as a two dimensional array. Instead of a simple column of numbers, I have a column in the vertical direction and also rows in the horizontal direction.…

Contents