Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
If you want to copy and paste, you should just use the copy and paste
methods, and not worry about matrices. But if you need a dynamic matrix, I think you should look into "Redim Preserve". Redim will "Dim" the variable with new subscripts. For example, Dim var (10) as long [Use var in code. Decide that you need more than 10 long words] Redim var (20) as long The Redim has changed the size of the array. Unfortunately, it has also lost the 10 values in the previous array. To save these use the "Preserve" keyword: Dim var (10) as long [Use var in code. Decide that you need more than 10 long words] Redim Preserve var (20) as long Now, var has changed size, and the first 10 values remain unchanged. The order of the subscripts is important in a matrix. If you are going to change a matrix, change only the last subscript. For example: Dim Mat (10, 5) as long [Use var in code. Decide that you need more than 10 long words] Redim Preserve Mat (10, 10) as long Hope this helps, Dom Egon wrote: I need help setting up an array to read data into. I would like to read data from 3 columns on one sheet into an array and then copy that information into another sheet. The Array/Matrix will be 3 columns wide, but the number of rows will need to be dynamic. Can anyone help? TIA E |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Matrix Math using LOOKUP inside Array {} Function | Excel Worksheet Functions | |||
Matrix/array question | Excel Discussion (Misc queries) | |||
mirrored array/matrix | Excel Discussion (Misc queries) | |||
How to use an array or matrix to return text vs. numeric values | Excel Worksheet Functions | |||
Lookup of sorts...Matrix Array etc. | Excel Programming |