Y
Ying
Say if I want to use an array to refer to numbers 1 to 200
without displaying them on a worksheet, how do I do it?
Thanks!
without displaying them on a worksheet, how do I do it?
Thanks!
Say if I want to use an array to refer to numbers 1 to 200
without displaying them on a worksheet, how do I do it?
-----Original Message-----
...
ROW(INDIRECT("1:200")) is most robust. To make that a horizontal array, wrap it
inside TRANSPOSE(.).
--
Never attach files.
Snip unnecessary quoted text.
Never multipost (though crossposting is usually OK).
Don't change subject lines because it corrupts Google newsgroup archives.
.
...What if they are 200 "random" numbers?
("1:200"))/RAND(),1) which isn't-----Original Message-----
...
...
It always helps to give full details the first time round.
What do you mean by 'random'? Merely arbitrary, like unsorted birthdates for 200
people? If so, you won't be able to squeeze that much data into an array
constant referred to by a defined name. That sort of data should be stored in
cells, if not out of strict necessity then for expedience.
On the other hand, large samples of pseudorandom numbers present other problems
because Excel's RAND() function won't generate arrays. While the defined name X
referring to =ROW(INDIRECT("1:200"))*0+RAND() would behave like a sample of 200
instances of a random variable if entered in an array formuls for a range
spanning 200 rows, it'll behave as 200 instances of the same value if entered in
single cell formulas like =DEVSQ(X), which returns zero or very close to it.
You could try Y referring to =MOD(ROW(INDIRECT
Actually, what I'm trying to do is calculate an inverse
matrix of a matrix without displaying the matrix on a
worksheet. To do that, I need to define ranges for each
row (or column) of the matrix (assume I can calculate the
elements beforehand). It seems pretty easy mathematically:
you could say, X = (x1, x2, ..., xi, ..., xn), where xi =
such and such, but how do you translate that into VBA
codes?