View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default worksheetfunction.transpose - nx1 to n element?

This behavior has been around at least since xl97 and I believe xl5 and
remains in xl2003.

Generally people speak of horizontal and vertical arrays.

A n-element 1 D array is Horizontal, so an n-element 1D array and a 1 x n
array are equivalent from a worksheet perspective. If you write a n element
1D array to the worksheet such as

Range(A1:J1).Value = Array(1,2,3,4,5,6,7,8,9,10)

it would be written correctly.




--
Regards,
Tom Ogilvy



"Chris Short" wrote in message
...
worksheetfunction.transpose has the nice property that passing an

n-element
row array returns an n x 1 array (ie it now has two dimensions).

However, I've just stumbled over passing an n x 1 array resulting in

single
dimension n element array being returned, rather than a 1 x n array.

This of course is symmetric to the first case, but not what was expected.

I've looked but haven't found any mention of this or a known workaround.

With Excel 2003, I'm looking to confirm this behavior.

thanks,
Christopher