=IF(A1="","",SUM(LET(
x,SEQUENCE(LEN(数据计算!B2)),
y,MID(数据计算!B2,x,1),
z,TEXTSPLIT(SUBSTITUTE(SUBSTITUTE(CONCAT(y&SCAN(0,x,LAMBDA(a,b,REPT("/",-1^SUM((x<b)*(y="/"))=1)))),"+/","+"),"r/","r"),"/",,1),
c,IF(LEN(z)=1,z,"/"&z&"/"),
d,TRANSPOSE(UNIQUE(c,1)),
f,BYROW(--EXACT(d,c),LAMBDA(e,SUM(e))),
h,TEXTSPLIT(TEXTJOIN(",",TRUE,BYROW(d,LAMBDA(r,TEXTJOIN(",",,FILTER(OFFSET(BOM[[#全部],[物料编码]],,MATCH(数据计算!F2,BOM[[#标题],[物料编码]:[20Umol]],0)-1),r=BOM[[#全部],[具体修饰]]))))),",")*1,
g,BYROW(d,LAMBDA(r,TEXTJOIN(",",,COUNT(FILTER(OFFSET(BOM[[#全部],[物料编码]],,MATCH(数据计算!F2,BOM[[#标题],[物料编码]:[20Umol]],0)-1),r=BOM[[#全部],[具体修饰]])*1)))),
i,TEXTSPLIT(CONCAT(REPT(f&",",g)),",",,TRUE)*1,
j,XLOOKUP(TEXTSPLIT(A1,",",,TRUE),物料单价!A:A,物料单价!C:C)*1,
i*j*h
)))
已经解决了,谢谢各位大佬的帮忙 |