如果符合特定条件,我会尝试计算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
答案 0 :(得分:2)
您可以使用以下公式:
=SUMPRODUCT((RIGHT(TEXT('General Expenses'!A:A,"dd/mm/yyyy"),4)="2012")*('General Expenses'!C:C="Office Supplies"),('General Expenses'!D:D))