Google Sheet: 如何反转和转置一行?

Google Sheet: How to reverse and transpose a row?

需要反转和转置 google sheet

中的一行

喜欢下面

尝试了以下公式,但没有颠倒顺序。帮帮我!

=FILTER(TRANSPOSE(A1:E1),TRANSPOSE(A1:E1)<>"")

尝试:

=QUERY(SORT(FLATTEN(A1:1), FLATTEN(COLUMN(A1:1)), 0),
 "where Col1 is not null")

或:

=INDEX(FLATTEN(VLOOKUP(ROW(A1), {ROW(A1), A1:1}, 
 TRANSPOSE(SORT(SEQUENCE(COUNTA(A1:1))+1, 1, 0)), 0)))
=SORT(TRANSPOSE(A1:E1),SEQUENCE(COLUMNS(A1:E1)),)
  • SEQUENCE 创建一个序列号数组
  • SORT 对它们进行反向排序

如需查空,使用QUERY过滤:

=QUERY(SORT(TRANSPOSE(A1:E1),SEQUENCE(COLUMNS(A1:E1)),),"where Col1 is not null",0)

尝试

=query(sort(transpose({ARRAYFORMULA(column(A1:E1));A1:E1}),1,false),"select Col2")