I have a worksheet named Sheet1 and it has data of the type
Name Id Data
xx 1 a
xx 1 b
xx 1 c
xx 1 d
yy 2 b
yy 2 d
zz 3 c
zz 3 a
zz 4 b
The ids can later on extend manifold. I need output in separate sheet say Sheet2 in the form
1 a b c d
2 b d
3 c a
4 b
The ids are available in the second sheet i.e. Sheet2 beforehand.
Please let me know how this can be done.
I have tried few things one of which was to create vertical arrays and then take a transpose
i.e.
1 2 3 4
a b c b
b d a
c
d
and it worked and i could create 4 columns using the formula
{=IF(COUNTIF(Sheet1!$B$2:$B$15,A$1)>=ROWS($2:2),INDEX(Sheet1!$C$2:$C$15,SMALL(IF(Sheet1!$B$2:$B$15=A$1,ROW($1:$14)),ROWS($2:2))),"")}.
But it stops working if i try it out for 5th id
Any idea where I am going wrong or if anybody has a better suggestion
Bookmarks