How to get row as single-dimensional array from tw

2019-09-11 18:05发布

For example: I have a table:

A1:1 B1:2 C1:3 
A2:5 B2:6 C2:7

And I want to get a column with values:

E1: 1
E2: 2
E3: 3
E4: 5 
E5: 6
E6: 7

So any help would really be appreciated. Thanks!

1条回答
做个烂人
2楼-- · 2019-09-11 18:33

If you need to get values from left to right from first row, then from second and so on, try this one:

  • in E1 formula =A1
  • in E2 formula =INDEX($A$1:$C$2,1+INT(COUNTA($E$1:E1)/COLUMNS($A$1:$C$2)),1+MOD(COUNTA($E$1:E1),COLUMNS($A$1:$C$2)))

and drag it down.

Note, this formula assumes that all your rows has the same column count (except maybe last row).

enter image description here

查看更多
登录 后发表回答