View Single Post
  #1   Report Post  
juan1 juan1 is offline
Junior Member
 
Posts: 1
Default from one column into multiple columns

I have a large data file in Excel like the following:

column 1
r231
r236
r239
r240
r231
r236
r239
r240
r231
r236
r239
r240
.
.
.
r231
r236
r239
r240

with upto 1 million rows.

column 2 has
item1
item1
item1
item1
item2
item2
item2
item2
item3
item3
item3
item3
.
.
.
itemX
itemX
itemX
itemX

Column 3 has
aa
bb
ab
ac
ab
bb
cc
aa
.
.
.
bb
aa
ac
cc

I would like to convert this data into the following table:

column 1, starting from the second row, has the following:
r231
r236
r239
r240

row 1, starting from second column, has item1, item2, item3, item4 in columns 2 through 5.

column 2, starting from the second row, has the original column 3 data that correspond to item1.

column 3, starting from the second row, has the original column 3 data that correspond to item2.

column 4, starting from the second row, has the original column 3 data that correspond to item3.

column 5, starting from the second row, has the original column 3 data that correspond to item3.

Would appreciate your help on how to do this in Excel 2010 for Windows.

This large data file is in txt format as well. A tip on how to convert the file in Linux/Unix is also appreciated.