View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Alan Alan is offline
external usenet poster
 
Posts: 188
Default Array of Values from Worksheet Range - What does it 'look' like?

"Dave Peterson" wrote in message
...

If you did this:

dim RangeArray as variant
rangearray = range("names").value
You'd end up with a 3 row by 1 column array (2 dimensions).

But this:
dim RangeArray as variant
RangeArray = Array(Range("Names").Value)
is like embedding an array into an array.
Legal, but different.

On the other hand:
dim myArray as variant
MyArray = Array("Alan", "Bob", "Charles")

Will end up as a nice single dimension array.


Hi Dave,

Thank you for your reply - I am understanding better now.

However, I still cannot seem to figure out how to return a (0 to 2)
one dimensional array using the worksheet range as opposed to
hard coding it.

If you did explain that above, and I am not understanding, please
accept my apologies!

Thanks,

Alan.