在 Google 工作表中使用过滤器后忽略空白单元格

Ignore blank cells after using Filter in Google Sheets

我的 Table 看起来像这样

这是使用的结果 =filter('Form Responses 1'!A:BJ,'Form Responses 1'!F:F=subjects!A19)

现在我要做的就是忽略空白单元格并放入最后 3 列。

我的意思是,N、O、P 列应该到 H、I、J 列,类似地,G 列右侧的其他列应该到 H、I、J 列。

请帮忙

A4更改为:

=filter('Form Responses 1'!A:G,'Form Responses 1'!F:F=subjects!A19)

将此放入 H4:

=ArrayFormula(IFERROR(SPLIT(REGEXREPLACE(TRANSPOSE(QUERY(TRANSPOSE(filter('Form Responses 1'!H:BJ,'Form Responses 1'!F:F=subjects!A19)&"♦"),,ROWS(A4:A))),"^(♦ )+|(♦ )*♦$|(♦ )(♦ )+",""),"♦ ",FALSE),))

样本:

使用:

=FILTER({'Form Responses 1'!A:G, 
 TRIM(SPLIT(FLATTEN(QUERY(TRANSPOSE(
 IF('Form Responses 1'!H:BJ="",,'Form Responses 1'!H:BJ&"♥")),,9^9)), "♥"))}, 
 'Form Responses 1'!F:F=subjects!A19)