我怎样才能用“|”分割这个数据集但将其保留在表格中的一栏中?

How can I split this dataset by "|" but keep it in one column in Sheets?

我在这里尝试使用 SPLIT(),但它只获取第一行: 请注意,范围是动态获取的,因此移动列不会丢失列引用:

=ARRAYFORMULA(
INDIRECT("Sheet1!"&REGEXEXTRACT(ADDRESS(5,MATCH("PO #",Sheet1!:,0)),"[A-Z]+")&"5:"&REGEXEXTRACT(ADDRESS(5,MATCH("PO #",Sheet1!:,0)),"[A-Z]+"))&"|"&
INDIRECT("Sheet2!"&REGEXEXTRACT(ADDRESS(5,MATCH("PO #",Sheet2!:,0)),"[A-Z]+")&"5:"&REGEXEXTRACT(ADDRESS(5,MATCH("PO #",Sheet2!:,0)),"[A-Z]+")))

这生成,这不是最终结果:

想法是用 | 拆分它并将它们堆叠起来,避免出现空白。

这是数据示例:https://docs.google.com/spreadsheets/d/1gh5w0czg2JuoA3i5wPu8_eOpC4Q4TXIRhmUrg53nKMU/edit?usp=sharing

谢谢!

使用:

=ARRAYFORMULA(QUERY({
INDIRECT("Orders!"&REGEXEXTRACT(ADDRESS(6,MATCH("PO #",Orders!:,0)),"[A-Z]+")&"6:"&REGEXEXTRACT(ADDRESS(6,MATCH("PO #",Orders!:,0)),"[A-Z]+"));
INDIRECT("Scenarios!"&REGEXEXTRACT(ADDRESS(6,MATCH("PO #",Scenarios!:,0)),"[A-Z]+")&"6:"&REGEXEXTRACT(ADDRESS(6,MATCH("PO #",Scenarios!:,0)),"[A-Z]+"))}, "where Col1 is not null", ))


更新:

=INDEX(QUERY({
 INDIRECT(   "Orders!"&ADDRESS(6, MATCH("PO #",    Orders!5:5, ))&":"&SUBSTITUTE(ADDRESS(2, MATCH("PO #",    Orders!5:5, ), 4), 2, ));
 INDIRECT("Scenarios!"&ADDRESS(6, MATCH("PO #", Scenarios!5:5, ))&":"&SUBSTITUTE(ADDRESS(2, MATCH("PO #", Scenarios!5:5, ), 4), 2, ))}, 
 "where Col1 is not null", ))