Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/google-sheets/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Google sheets 如何在Google工作表中将数据移动到右边的空单元格?_Google Sheets_Google Sheets Formula_Transpose_Array Formulas_Google Sheets Query - Fatal编程技术网

Google sheets 如何在Google工作表中将数据移动到右边的空单元格?

Google sheets 如何在Google工作表中将数据移动到右边的空单元格?,google-sheets,google-sheets-formula,transpose,array-formulas,google-sheets-query,Google Sheets,Google Sheets Formula,Transpose,Array Formulas,Google Sheets Query,我想设计一个组织结构图,我正在建立这样一个主管树 9 8 7 6 5 4 3 2 1 0 A B C D E F B C 通过使用vlookup,我得到了如上所示的表格 现在我希望桌子是这样的: 9 8 7 6 5 4 3 2 1 0 A B C D E F B C

我想设计一个组织结构图,我正在建立这样一个主管树

9  8  7  6  5  4  3  2  1  0
A  B  C                    
D
E  F  B  C
通过使用vlookup,我得到了如上所示的表格

现在我希望桌子是这样的:

9  8  7  6  5  4  3  2  1  0
                     A  B  C
                           D
                  E  F  B  C
我试过了

=IFS(ISBLANK(I2),H2,ISBLANK(H2),G2,ISBLANK(G2),F2,ISBLANK(F2),E2,ISBLANK(E2),D2,ISBLANK(D2),C2,ISBLANK(C2),B2,ISBLANK(B2),A2)
但结果却是
#REF

我只想把数据移到右边,去掉那些空单元格

有人知道怎么做吗?或者我们可以在BigQuery中实现它吗?

试试:

=ARRAYFORMULA(TRIM(SUBSTITUTE(IFERROR(SPLIT(REPT("♦♠", 
 IF(A2:A<>"", MMULT(IF(A2:J<>"", 0, 1), TRANSPOSE(COLUMN(A2:J)^0)), ))&
 TRANSPOSE(QUERY(TRANSPOSE(IF(A2:J<>"", "♦"&A2:J, )),,999^99)), "♦")), "♠", )))
=阵列公式♦♠", 
IF(A2:A“”,MMULT(IF(A2:J“”,0,1),转置(列(A2:J)^0)),)&
转置♦“&A2:J,),,999^99”),”♦")), "♠", )))