ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Help with arrays please (https://www.excelbanter.com/excel-programming/302581-help-arrays-please.html)

Gary[_18_]

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

Gary[_18_]

Help with arrays please
 
I am selecting a table on a worksheet, making it active and then using
the Selection.array (I did find how to do this in the help files a few
days ago BUT didn't make a note of it, now I cannot find it again.)
I though it was 'Selection.array'

Gary

In article m,
says...
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


Gary Smith[_2_]

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!

Alan Beban[_2_]

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


Tom Ogilvy

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!




Gary[_18_]

Help with arrays please
 
Thankyou, I have given it a go and with a bit of fiddling it works BUT
what are the & signs for please

In article m,
says...
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


Gary[_18_]

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



All times are GMT +1. The time now is 10:57 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com