[英]Excel VBA code to transpose data from rows to columns
I have data in column A with 50000 rows of data. 我在A列中有50000行数据。 I need to transpose every 6 rows of data to 6 columns.
我需要将每6行数据转换为6列。 For example data from A1:A6 must be transposed to B1:G1.
例如,来自A1:A6的数据必须转换为B1:G1。 Again data from A7:A14 must be transposed to B2:G2.
同样来自A7:A14的数据必须转换为B2:G2。 I appreciate if anyone can provide VBA code for this.
我很感激,如果有人能为此提供VBA代码。
Data I have in column A is as shown below:
我在A栏中的数据如下所示:
Col A
1
2
3
4
5
6
7
8
9
10
11
12
The transpose data must be as shown below in col B to col G:
转置数据必须如下面的col B到col G所示:
Columns B C D E F G
1 2 3 4 5 6
7 8 9 10 11 12
在葡萄牙语Excel中,“加里学生”的公式为4列而不是6列,变为:
=DESLOCAMENTO($A$1;COLS($A:A)-1+(LINS($1:1)-1)*4;0)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.