方法有:
对于多个表,除了用sumif()+sumif+sumif()...外,Sumif函数支持多表同时求和,但必须用indirect函数生成对多个表的引用,即:
INDIRECT(ROW($1:$5)&"日!B:B")和INDIRECT(ROW($1:$5)&"日!C:C")用sumif组合起来,即:
=SUMIF(INDIRECT(ROW($1:$5)&"日!b:b"),A2,INDIRECT(ROW($1:$5)&"日!c:c"))
而上述的公式返回的每个表的求和结果,是一组数,最后还需要用sumrpoduct函数进行求和,即:
=SUMPRODUCT(SUMIF(INDIRECT(ROW($1:$5)&"日!b:b"),A2,INDIRECT(ROW($1:$5)&"日!c:c")))