![](/img/trans.png)
[英]How to split data of one column into multiple equal n columns in Excel or R?
[英]How to split one column of data into multiple columns in Excel
我目前在Microsoft Excel 2013中工作,我有一列大数据,我想一分为三。 我想从这里开始:
name_1
timestamp_1
comment_1
name_2
timestamp_2
comment_2
...
name_N
timestamp_N
comment_N
对此:
name_1 timestamp_1 comment_1
name_2 timestamp_2 comment_2
...
name_N timestamp_N comment_N
有没有办法做到这一点?
我认为您的数据在单列中。 您可以创建一个子来完成此操作
Sub rowToColumn()
nRow = 2 'Assume u have header on Row 1
Do until cells(nRow,"A") = ""
cells(nRow, 2) = cells(nRow + 1, "A")
cells(nRow, 3) = cells(nRow + 2, "A")
'Then remove the additional row.....
bla bla bla......
nRow = nRow + 1
Loop
End sub
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.