Share via

Horizontally stack column arrays

Anonymous
2017-08-17T02:35:36+00:00

I eventually want to be able to extract a subset of columns from a formally defined table.  I can then use that subset wherever an array or range argument is needed.  It would look something like:

   { myTable[FirstField], myTable[ThirdField], myTable[FifthField] }

where the braces delimit an array.  If column arrays cannot be abbutted side-by-side, for some reason, then I planned to transpose them into rows, stack them, then transpose back.

Being new to array formulas and array notation in general, I started small.  This array formula works, if I select the right sized range of cells (2 high, 3 wide):

   ={ TRANSPOSE({1;2;3}) ,  TRANSPOSE({1;2;3}) }

However, these doesn't:

   = TRANSPOSE( TRANSPOSE( { 1,2,3 ; 4,5,6 } ) )

   = { TRANSPOSE({1,2,3}) , TRANSPOSE({4,5,6} ) }

   = { {1,2,3} ; {4,5,6} }

It seems that when you are building an array using curly braces, the elements within those braces cannot be arrays themselves.

Is there a good way to horizontally stack column arrays, without having to delve into VBA?

I guess the same question can be asked about vertically stacking row arrays.  But my immediate interest is in the former.

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

Anonymous
2017-08-17T21:01:09+00:00

No, there isn't. You may want to use VBA for that.

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

Answer accepted by question author

Anonymous
2017-08-17T02:49:27+00:00

It seems that when you are building an array using curly braces, the elements within those braces cannot be arrays themselves.

That is correct.

Was this answer helpful?

0 comments No comments

2 additional answers

Sort by: Most helpful
  1. Anonymous
    2017-08-18T19:14:35+00:00

    OK, thanks.  :(

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2017-08-17T18:07:33+00:00

    Thanks for clarifying.  Somehow, I don't think there's a simple way to do what I was asking :(  .

    Was this answer helpful?

    0 comments No comments