Need help in creating horizontal array using either macro or someformula

R

ruby manchanda

I was using a formula but suddenly it stopped working. 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

This is the data that i was using. 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 b
Please let me know how this can be done.

Submitted via EggHeadCafe
Twitter Search API with jQuery and JSONP
http://www.eggheadcafe.com/tutorial...twitter-search-api-with-jquery-and-jsonp.aspx
 
D

Don Guillett Excel MVP

I was using a formula but suddenly it stopped working. I have a worksheetnamed 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

This is the data that i was using. 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 b
Please let me know how this can be done.

Submitted via EggHeadCafe
Twitter Search API with jQuery and JSONPhttp://www.eggheadcafe.com/tutorials/aspnet/94d7bda5-c477-4ff9-b71d-e...

Sub redodataSAS()
Range("copyblk").Copy Range("a1")
For i = Cells(Rows.Count, "a").End(xlUp).Row To 1 Step -1
If Cells(i + 1, "a") = Cells(i, "a") Then
lc = Cells(i + 1, Columns.Count).End(xlToLeft).Column + 1
Cells(i, "b").Copy Cells(i + 1, lc)
Rows(i).Delete
End If
Next i
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top