Excel中的多个SUMIFS无法按预期工作

时间:2014-01-20 23:24:02

标签: excel ms-office sumifs

如果符合特定条件,我会尝试计算excel中其他工作表的结果。我已经成功查找并实现了SUMIF函数,如下所示:

=SUMIF('General Expenses'!C:C,"*Office Supplies*",'General Expenses'!D:D)

返回预期输出。现在,我尝试使用函数SUMIFS来过滤使用多个条件(年份和类别),例如:

=SUMIFS('General Expenses'!D:D,'General Expenses'!A:A,"*2012*",'General Expenses'!C:C,"Office Supplies")

这不符合预期,并以0为值。以下是General Expenses表格的内容:

DATE        PLACE          CATEGORY           AMOUNT
1/1/2012    Staples        Office Supplies    $ 18.40
1/3/2012    Staples        Office Supplies    $  5.63
1/5/2012    Staples        Office Supplies    $ 54.00

1 个答案:

答案 0 :(得分:2)

您可以使用以下公式:

=SUMPRODUCT((RIGHT(TEXT('General Expenses'!A:A,"dd/mm/yyyy"),4)="2012")*('General Expenses'!C:C="Office Supplies"),('General Expenses'!D:D))