문제

I'm trying to tally up results from another sheet in excel if they match specific criteria. I have successfully looked up and implemented the SUMIF function like so:

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

This returns the expected output. Now I'm trying to use the function SUMIFS to filter using multiple criteria (year & category) ex:

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

This does not work as expected and gives me 0 as the value. Below is what the General Expenses sheet looks like:

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
도움이 되었습니까?

해결책

You can use following formula:

=SUMPRODUCT((RIGHT(TEXT('General Expenses'!A:A,"dd/mm/yyyy"),4)="2012")*('General Expenses'!C:C="Office Supplies"),('General Expenses'!D:D))
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top