One try ..
Suppose this data-set is in Sheet1, A1:B8
A 1
A 2
A 3
A 4
B 1
B 2
C 1
D 1
In Sheet2
------------
Listed in A1 down are: A, B, C, D
Select D1:K1
(i.e. a horizontal range** equal in size to
the # of rows of data in Sheet1)
Put in the formula bar:
=IF(TRANSPOSE(IF(Sheet1!$A$1:$A$8=A1,Sheet1!$B$1:$B$8,""))=0,"",TRANSPOSE(IF
(Sheet1!$A$1:$A$8=A1,Sheet1!$B$1:$B$8,"")))
Array enter the formula,
i.e. press CTRL+SHIFT+ENTER,
instead of just pressing ENTER
Put in B2:
=TRIM(D1&" "&E1&" "&F1&" "&G1&" "&H1&" "&I1&" "&J1&" "&K1)
Select B2:K2, fill down
You'll get in A1:B4:
(Hide away cols D to K, if desired)
**This condition will unfortunately, limit you
to cover up to a max of ~245 rows of data in Sheet1,
[ Max cols is 256, less 11 cols used = 244 ]
Adapt / extend to suit
--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <at>yahoo<dot>com
----
adin said:
I'd like this:
Column A Column B
A 1
A 2
A 3
A 4
B 1
B 2
C 1
D 1
to look like:
A 1 2 3 4
B 1 2
C 1
D 1
The numbers should be in the same cell, not different columns.
Easy, right?
Thanks.