Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Help with arrays please

I am having problems with arrays, I want to use a table (on a worksheet)
as an indexing/sorting system using a couple of loops (21 rows of 6)
columns. I have tried to workout how to do this from the help files but
to no avail. Could someone please help with the basics I.e. declaring
and naming the array and then the proper wording for retrieving the
information from within the array (if you know what I mean)It will be
text stored in the array
I thought it was something like
dim myarray (21, 6) 'defining the size
myarray (1,1) 'to get the information in column 1 row 1 from the array
But this doesn't work\0\0\0\0\0
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Help with arrays please



I am trying to use a table on a worksheet, Using the macro to select the
table, selecting it, then using the "selection.array" command (I think
thats the way(saw a help file on how to do it but cannot find it again)

*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 783
Default Help with arrays please

How is the data put into the array?

Alan Beban

Gary wrote:

I am having problems with arrays, I want to use a table (on a worksheet)
as an indexing/sorting system using a couple of loops (21 rows of 6)
columns. I have tried to workout how to do this from the help files but
to no avail. Could someone please help with the basics I.e. declaring
and naming the array and then the proper wording for retrieving the
information from within the array (if you know what I mean)It will be
text stored in the array
I thought it was something like
dim myarray (21, 6) 'defining the size
myarray (1,1) 'to get the information in column 1 row 1 from the array
But this doesn't work

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Help with arrays please

Dim vArr as Variant
vArr = Selection.Value
for i = 1 to ubound(varr,1)
for j = 1 to ubound(varr,2)
msgbox "vArr(" & i & ", " & j & ")=" & vArr(i,j)
next
next

--
Regards,
Tom Ogilvy


"Gary Smith" wrote in message
...


I am trying to use a table on a worksheet, Using the macro to select the
table, selecting it, then using the "selection.array" command (I think
thats the way(saw a help file on how to do it but cannot find it again)

*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!





  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Help with arrays please

Im trying to put it in by specifying a using the macro to specify a
table on a work sheet, making in active and then the command
selection.Array. (I think that is the commands)
I have got the program to work using the 'offset' command and using the
content of the activated cell as a check reference BUT I have to loop
this 126 times. My thinking is that if I pop this table (which can
change into an array the macro should be a bit faster)
Would it help if I posted the routine?

Gary

In article ,
says...
How is the data put into the array?

Alan Beban

Gary wrote:

I am having problems with arrays, I want to use a table (on a worksheet)
as an indexing/sorting system using a couple of loops (21 rows of 6)
columns. I have tried to workout how to do this from the help files but
to no avail. Could someone please help with the basics I.e. declaring
and naming the array and then the proper wording for retrieving the
information from within the array (if you know what I mean)It will be
text stored in the array
I thought it was something like
dim myarray (21, 6) 'defining the size
myarray (1,1) 'to get the information in column 1 row 1 from the array
But this doesn't work

\0\0\0\0\0

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
two arrays Jerry Kinder New Users to Excel 4 February 26th 06 08:29 AM
Arrays Tobro88 Excel Discussion (Misc queries) 3 November 18th 05 11:28 PM
Need help with arrays (I think) rbhedal Excel Worksheet Functions 3 October 19th 05 07:24 AM
Arrays David Excel Programming 5 January 10th 04 05:09 AM
arrays solo_razor[_44_] Excel Programming 2 December 15th 03 12:06 PM


All times are GMT +1. The time now is 01:25 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"