在Google表格中,如何将多个列标题和数据转置为具有多个行标签和数据的单个列

时间:2019-11-06 02:32:55

标签: google-sheets google-sheets-formula transpose array-formulas google-sheets-query

不确定用什么电子表格术语来表达这一点。

如何打开它:

+-----------+-----------+-----------+...
|Username   |First Name |Second Name|...
+-----------+-----------+-----------+...
|Uname1     |FName1     |SName1     |...
+-----------+-----------+-----------+...
|Uname2     |FName2     |SName2     |...
+-----------+-----------+-----------+...
|Uname3     |FName3     |SName3     |...
+-----------+-----------+-----------+...
:           :           :           :

进入这个?

+-----------+-----------+
|Username   |Uname1     |
+-----------+-----------+
|First Name |FName1     |
+-----------+-----------+
|Second Name|SName1     |
+-----------+-----------+
|Username   |Uname2     |
+-----------+-----------+
|First Name |FName2     |
+-----------+-----------+
|Second Name|SName2     |
+-----------+-----------+
:           :           : 

省略号表示多列/行继续。

我尝试谷歌搜索将列转换为行,但找不到该问题的确切解决方案。

1 个答案:

答案 0 :(得分:2)

尝试:

=ARRAYFORMULA(SPLIT(TRANSPOSE(SPLIT(QUERY(TRANSPOSE(QUERY(TRANSPOSE(
 IF(A2:C<>"", "♦"&A1:C1&"♥"&A2:C, )),,999^99)),,999^99), "♦")), "♥"))

0