Join four columns into one according to each row

北战南征 提交于 2021-01-28 11:29:16

问题


A B C D
E F G H
I J K L
M N O P

If I chose to join the columns I would ={A1:A;B1:B;C1:C;D1:D} but it would look like this:

A
E
I
M
B
F
J
N
... and so on

I would like it to look like this:

A
B
C
D
E
F
G
... and so on

How to proceed in this case?

Note: It may happen that some of the columns are not complete in data, some may have more values than the others, but I still want to continue following this same pattern. Example:

A B   D
E   G H
I J K L
M N O P

Result:

A
B
D
E
G
H
... and so on

回答1:


use:

=TRANSPOSE(QUERY(TRANSPOSE(A:D),, 9^9))

then:

=TRANSPOSE(SPLIT(QUERY(TRANSPOSE(QUERY(TRANSPOSE(A:D),,9^9)),,9^9), " "))



来源:https://stackoverflow.com/questions/60028381/join-four-columns-into-one-according-to-each-row

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!