Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Accessing a 'column' in a VB array
In VB, how does one access an entire column or row. Let's say I have a
5x2 array and I would like to access all the data in the 1 column (i.e. (1,1 2,1 3,1 4,1 5,1). So given a variable defined as, tempArray(1 To 2, 1 To 5) As Double how could I access all the 1's column? I know in Matlab I could use the command, tempArray(:,1) not sure the equivalent in Excel. - Kwaj |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Accessing a 'column' in a VB array
den1s Wrote: In VB, how does one access an entire column or row. Let's say I have a 5x2 array and I would like to access all the data in the 1 colum (i.e. (1,1 2,1 3,1 4,1 5,1). So given a variable defined as, tempArray(1 To 2, 1 To 5) As Double how could I access all the 1's column? I know in Matlab I could use the command, tempArray(:,1) not sure the equivalent in Excel. - Kwaj Try something like Code ------------------- Dim i As Integer For i = LBound(tempArray,2) To UBound(tempArray,2) MsgBox tempArray(2, i) Next ------------------- -- jindo ----------------------------------------------------------------------- jindon's Profile: http://www.excelforum.com/member.php...fo&userid=1313 View this thread: http://www.excelforum.com/showthread.php?threadid=55173 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Accessing a 'column' in a VB array
den1s wrote:
In VB, how does one access an entire column or row. Let's say I have a 5x2 array and I would like to access all the data in the 1 column (i.e. (1,1 2,1 3,1 4,1 5,1). So given a variable defined as, tempArray(1 To 2, 1 To 5) As Double how could I access all the 1's column? I know in Matlab I could use the command, tempArray(:,1) not sure the equivalent in Excel. - Kwaj Application.Index(tempArray, 0, 1) Alan Beban |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to manipulate an 2D Array into a Column Array? | Excel Discussion (Misc queries) | |||
Finding a number in a column out of an array in another column | Excel Discussion (Misc queries) | |||
Type mismatch accessing variant array too many times | Excel Programming | |||
calculting stats of column array in 3D array | Excel Programming | |||
accessing data from an array | Excel Programming |