{=SUM(INDIRECT("'sheet1'!"&SUBSTITUTE(ADDRESS(1,XMATCH(C$2,INDIRECT("'sheet1'!A1:"&SUBSTITUTE(ADDRESS(1,O1+16,4),"1","")&ROWS($M$1:$M$1)),0),4),"1","")&XMATCH($B3,INDIRECT("'sheet1'!$m$1:$m"&M1),0)):INDIRECT("'sheet1'!"&SUBSTITUTE(ADDRESS(1,XMATCH(C$2,INDIRECT("'sheet1'!A1:"&SUBSTITUTE(ADDRESS(1...