如何转置部分数据,同时重复表格中的其他一些列值?

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

数据集看起来像这样,因为它获取表单提交:

然后,要求将 B 列之后的列转置,同时用逗号分割单元格值,并转置和重复列标题,使其看起来像这样:

我有这个文件用于测试,以防你想帮忙。我的尝试失败了,因为我无法理解更高级的功能,如

lambda
map
等。 https://docs.google.com/spreadsheets/d/1gh5w0czg2JuoA3i5wPu8_eOpC4Q4TXIRhmUrg53nKMU/edit?usp=sharing

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

你可以试试:

=let(Λ;tocol(;1); reduce(Λ;C2:index(D:D;match(;0/(A:A<>"")));lambda(a;c;vstack(if(iserror(a&"");Λ;a);let(Σ;tocol(split(c;", ";));if(c="";Λ;
 hstack(chooserows({index(A:B;row(c))\index(1:1;column(c))};sequence(rows(Σ);1;1;0));Σ)))))))

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