View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Max
 
Posts: n/a
Default Transpose words and numbers into array of different proportions

Here's one formulas play which could achieve this ..

A sample construct is available at:
http://cjoint.com/?cihstRPtdA
Transform a source matrix into another matrix of a different size.xls

The source 5C x 4R matrix is assumed in A1:E4

Put in say, G1:
=OFFSET($A$1,INT((ROWS($A$1:A1)-1)/5),MOD(ROWS($A$1:A1)-1,5))
Copy G1 down to G20, to re-lay the source matrix into a vert col (1C x 20R)
("5" = # no. of cols)

Then put in say, J2:
=IF(ISERROR(INDEX($G$1:$G$20,ROW(A1)*7-7+COLUMN(A1))),"",
INDEX($G$1:$G$20,ROW(A1)*7-7+COLUMN(A1)))
Copy J2 across & fill down to P3 populate the desired 7C x 3R matrix, which
would be dynamic to changes in the source matrix
("7" = # no. of cols)

Adapt to suit ..
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Manfred" wrote in message
oups.com...
Maybe you guys could take a break from giving free technical school
answers to lazy partiers and try this fun problem. I dreamed part of
it last nicht.

How do I transpose an array of words and numbers into an array of
different proportions?

The proportions of the arrays can be anything, including n x 1 and 1 x
n.
The size of the array can be anything that fits on a worksheet and can
be located anywhere on the worksheet.

Ex:
Array of the present (4x5)
ab 12 de 1.55 ghe
ef 34 nu 3.65 unt
gh 56 mc 2.45 wen
kl 78 vm 1.35 rep

After a re-arrange (7x3)
ab 12 de 1.55 ghe ef 34
nu 3.65 unt gh 56 mc 2.45
wen kl 78 vm 1.35 rep

I am uncomfortable with VBA so don't use VBA.

I don't want to copy/paste because I want the second array to update
immediately when I change the values in the first array.

Also another reason I don't want to use VBA is I would necessitate to
run it after every update.

Thank you and have a good evening,
Manfred Straub
(originally from east Zurich)