Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default Select a column from a matrix

Hello,

I have declared a variable:
Dim dataHere(1 to 9, 1 to 3) as double

How could I select the second column from this matrix to use in
further calculations ?

I tried dataHere(All, 2) and dataHere(1 To 9 , 2)but got an error each
time.

Any ideas ?

Tom

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default Select a column from a matrix

not exactly sure what you're trying to do, but maybe this will give you an idea.

Sub test2()
Dim x As Long
Dim dataHere As Variant
dataHere = Range("A1:C9")
For x = LBound(dataHere) To UBound(dataHere)
Debug.Print dataHere(x, 2)
Next
End Sub

--


Gary


wrote in message
...
Hello,

I have declared a variable:
Dim dataHere(1 to 9, 1 to 3) as double

How could I select the second column from this matrix to use in
further calculations ?

I tried dataHere(All, 2) and dataHere(1 To 9 , 2)but got an error each
time.

Any ideas ?

Tom



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default Select a column from a matrix

On Jun 11, 4:02*pm, "Gary Keramidas" <GKeramidasATmsn.com wrote:
not exactly sure what you're trying to do, but maybe this will give you an idea.

Sub test2()
Dim x As Long
Dim dataHere As Variant
dataHere = Range("A1:C9")
For x = LBound(dataHere) To UBound(dataHere)
* * * Debug.Print dataHere(x, 2)
Next
End Sub

--

Gary

wrote in message

...



Hello,


I have declared a variable:
Dim dataHere(1 to 9, 1 to 3) as double


How could I select the second column from this matrix to use in
further calculations ?


I tried dataHere(All, 2) and dataHere(1 To 9 , 2)but got an error each
time.


Any ideas ?


Tom- Hide quoted text -


- Show quoted text -


Hi Gary,

I want to use the result in a MMULT function, so want to take out the
second column and go:

MMULT(dataHere(All, 2), anotherArray)

I'm not sure if this can be done.

Tom
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Column multiplied by a matrix StephenT Excel Discussion (Misc queries) 2 February 25th 10 03:17 PM
Making a Matrix into a column....... Alex Rauket Excel Discussion (Misc queries) 4 May 22nd 08 12:01 PM
Matrix to a Column Report Dave Excel Programming 8 May 2nd 06 09:31 PM
Changing a matrix into one large column jeroen2 Excel Programming 3 January 26th 06 07:57 PM
Matrix to single column RD Wirr Excel Worksheet Functions 13 January 4th 06 09:06 PM


All times are GMT +1. The time now is 04:51 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"