Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Column to Rows

Status
Not open for further replies.

Brianfree

Programmer
Feb 6, 2008
220
GB
Hello, i have an excel document in the following format..

ColA, ColB
Apple, 123
Apple, 345
Pear, 678
Grape, 890
Orange, 111
Orange, 222
Orange, 333
Etc..

I need to convert to

ColA, ColB, ColC
Apple, 123, 345
Pear, 678
Grape, 890
Orange, 111, 222, 333

Please can anyone help?

Many thanks,

Brian
 
Don't you really mean...

I need to convert to

ColA, ColB, ColC, ColD

???

What are your table heading values? I think they are
Name, Value.

But there also seems to be an implied value of Occurrence. Anyhow, a PivotTable would do nicely assuming all the assumptions I made, and could be accomplished in about 15 seconds.

Skip,

[glasses]Just traded in my OLD subtlety...
for a NUance![tongue]

"The most incomprehensible thing about the universe is that it is comprehensible" A. Einstein
AD1D550E-FCB5-4AB6-A3C8-1F86CACE2554_ne1bcz.jpg
 
Here's my version of your data...

The source data table on left, converted to a Structured Table via Insert > Tables > Table, named Table1, showing the formula for sequence of each Name...

tt-Pivot20191101_hhpaxp.png


The Pivot result using a formula to display the NmVal for each NmSeq for any Name...

tt-Pivot20191102_tk4zx7.png


You can use Data > Distinct List to gen the unique list of Names.

Hope this helps.

Skip,

[glasses]Just traded in my OLD subtlety...
for a NUance![tongue]

"The most incomprehensible thing about the universe is that it is comprehensible" A. Einstein
AD1D550E-FCB5-4AB6-A3C8-1F86CACE2554_ne1bcz.jpg
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top