在楼上老师这改一下,,
365版:
C2=LET(t,TEXTBEFORE(C$1,"月"),SUM(OFFSET(INDIRECT("'"&t&"月数据'!$A$1"),1,MATCH("*"&SUBSTITUTES(TEXTAFTER(C$1,"月"),{"保险","人员","金额"},""),INDIRECT("'"&t&"月数据'!$1:$1"),)-1,1000)*(OFFSET(INDIRECT("'"&t&"月数据'!$A$1"),1,5,1000)=LOOKUP("座",$A$2:$A2))*(OFFSET(INDIRECT("'"&t&"月数据'!$A$1"),1,4,1000)=$B2))) 右拉下拉
老版:
C2=SUM(OFFSET(INDIRECT("'"&LEFT(C$1,FIND("月",C$1)-1)&"月数据'!$A$1"),1,MATCH("*"&SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(MID(C$1,FIND("月",C$1)+1,99),"保险金额",""),"人员",""),"金额",""),INDIRECT("'"&LEFT(C$1,FIND("月",C$1)-1)&"月数据'!$1:$1"),)-1,1000)*(OFFSET(INDIRECT("'"&LEFT(C$1,FIND("月",C$1)-1)&"月数据'!$A$1"),1,5,1000)=LOOKUP("座",$A$2:$A2))*(OFFSET(INDIRECT("'"&LEFT(C$1,FIND("月",C$1)-1)&"月数据'!$A$1"),1,4,1000)=$B2)) 右拉下拉 |