按重复次数拆分

问题描述 投票:0回答:1

我有一张工作表需要拆分和转置,另一列将按代表数重复,另一列仅复制每个代表的第一条记录,“重复”留空

这是供您参考的表格 https://docs.google.com/spreadsheets/d/1IhjE3r6DpOF-tcnzk9ITvLLLv-8KzyMVJ-2BM3_8KRM/edit#gid=2086741331

https://docs.google.com/spreadsheets/d/1IhjE3r6DpOF-tcnzk9ITvLLLv-8KzyMVJ-2BM3_8KRM/edit#gid=2086741331

google-sheets google-sheets-formula
1个回答
0
投票

您可以尝试:

=reduce(A1:G1,F2:F6,lambda(a,c,ifna(vstack(a,if(c="",tocol(,1),let(Σ,split(c,"; ",0),a,offset(c,,-5),g,offset(c,,1),Λ,counta(Σ),hstack(wrapcols(a,Λ,a),offset(c,,-4,,4),tocol(Σ),wrapcols(g,Λ,g))))))))

© www.soinside.com 2019 - 2024. All rights reserved.