1

我想将一个范围内的每个值与另一个选定范围(数组)连接起来,但在它们之间添加一个空值以提高可读性。

values to join: {"A","B","C"}
<0>
A   B
CAT <formula goes here>
DOG

<1>
A   B
CAT CAT_A
DOG CAT_B
    CAT_C
    DOG_A
    DOG_B
    DOG_C

<2>
A   B
CAT CAT_A
DOG CAT_B
    CAT_C

    DOG_A
    DOG_B
    DOG_C

所以我做<1>

=ArrayFormula(TRANSPOSE(split(textjoin("|",1,(concat(filter([range],[range]<>""),"_"&{"A","B","C"}))),"|")))

但我不知道如何为 make 添加一个空值<2>

4

1 回答 1

1
=ARRAYFORMULA(TRIM(TRANSPOSE(SPLIT(QUERY(TRANSPOSE(SPLIT(TEXTJOIN("|", 1, 
 FILTER("♦"&A4:A, A4:A<>"")&"_"&{"A", "B", "C♦"}), "|")),,999^99), "♦"))))

0

于 2019-07-11T13:23:26.380 回答