98.7% Of all customers recommend us, we're so confident about our results we publish all reviews and stats
View Live Stats View ReviewsForum home » Delegate support and help forum » Microsoft Excel VBA Training and help » Arrays
Arrays
Resolved · Low Priority · Version 2003
Nandana has attended:
Excel VBA Intro Intermediate course
Arrays
What is an array?
RE: Arrays
Nandana
In computer terms an array is a data structure consisting of elements that are accessed by indexing.
In most programming languages each element has the same data type and the array occupies a contiguous area of storage.
In VBA as with most other languages Variables normally only store a single value but, in some situations, it is useful to declare a variable as an Array that can store a series of related values.
The indexing in an array begins at 0 so declaring an array as
Dim SalesYear(5) as Integer
will allow you to store 6 years (0 t0 5)
Then in the code SalesYear(3) will return the value stored in that section of the array
Hope this helps
Carlos
Training information:
Welcome. Please choose your application (eg. Excel) and then post your question. Our Microsoft Qualified trainers will then respond within 24 hours (working days). Frequently Asked Questions
Any suggestions, questions or comments? Please post in the Improve the forum thread. |
Excel tip:Wrapping Text in a Cell in an Excel 2010 WorkbookWhen you have a lot of text you want to put in a particular cell but you can't decrease the font size to fit because the text will then become ineligible, then manually wrap the text in a cell by simply pressing ALT+ENTER. |