我需要根据特定物料编号的序列号和公式连接某些属性值以自动化该过程。我有以下屏幕截图中列出的列,我希望得到“预期结果”列中的结果。 预期结果
我需要哪些辅助列以及如何通过公式获取预期值?一些复杂的示例可在https://docs.google.com/spreadsheets/d/1UohDcgBMZThzG37s0nDpRYbFFRNGeCeV/edit?usp=drive_link&ouid=100858153522202375139&rtpof=true&sd=true
答案1
正如上面评论中提到的,给出的公式已经起作用,OP 也澄清了疑虑:
• 单元格中使用的公式G2
=LET(
α, FILTER($D$2:$F$31, $A$2:$A$31=A2,""),
δ, TAKE(α,,1),
φ, UNIQUE(δ),
TEXTJOIN({": ",", "},,HSTACK(φ, MAP(φ,LAMBDA(m,
TEXTJOIN({", ",", ",", "},1,TRIM(FILTER(INDEX(α,,2)&" "&INDEX(α,,3),δ=m))))))))
注意:上面的公式需要填写到其余单元格中
更新公式:
=LET(
α, FILTER($D$2:$F$31, $A$2:$A$31=A2,""),
δ, TAKE(α,,1),
φ, UNIQUE(δ),
ε, INDEX(α,,2),
∞, INDEX(α,,3),
TEXTJOIN({": ",", "},1,HSTACK(φ, MAP(φ,LAMBDA(m,
TEXTJOIN({", ",", ",", "},1,TRIM(FILTER(ε&" "&IF((δ="POLE QUANTITY")*(ε=""),"-",TEXT(∞,"General;;")),δ=m))))))))