构建带有附加项的列表

Build List with Attached Items

我的细胞是这样的:

我希望它们看起来像这样,单元格之间的间距需要它来容纳已完成的修复:

如果有任何其他信息可以帮助,我将不胜感激!

尝试:

=ARRAYFORMULA({SPLIT(FLATTEN(SPLIT(QUERY(
 IF(D1:D="",,"×"&TO_TEXT(A1:A)&"♦"&B1:B&"♦"&C1:C&REPT("× ", 
 LEN(REGEXREPLACE(D1:D, "[^,]", )))),,9^9), "×")), "♦"), 
 QUERY(TRIM(FLATTEN(IFERROR(SPLIT(D1:D, ",")))), "where Col1 is not null", )})


更新 1:

=ARRAYFORMULA({SPLIT(FLATTEN(SPLIT(QUERY(
 IF((D1:D="")*(A1:A=""),,"×"&TO_TEXT(A1:A)&"♦"&B1:B&"♦"&C1:C&REPT("× ", 
 LEN(REGEXREPLACE(D1:D, "[^,]", )))),,9^9), "×")), "♦"), 
 SUBSTITUTE(QUERY(TRIM(FLATTEN(IFERROR(SPLIT(IF((D:D="")*(A:A<>""),"¤",D1:D), ",")))), 
 "where Col1 is not null", ), "¤", )})


更新 2:

=INDEX(SUBSTITUTE(QUERY(SPLIT(FLATTEN(TO_TEXT(A1:A)&"×"&B1:B&"×"&C1:C&"×"&
 TRIM(SPLIT(IF((A1:A<>"")*(D1:D=""), "♥", D1:D), ","))), "×"), 
 "where Col4 is not null"), "♥", ))

demo sheet