# Thread: Multiple sumifs formula in a cell

1. ## Multiple sumifs formula in a cell

I created a worksheet which has a code NLC and pull in a number from another work sheet. I want to subtract the NLC amount from the TODAYS REFUNDED TODAY and PRIOR DAYS RECEIPTS REFUNDED TODAY.

The TODAYS REFUNDED TODAY and PRIOR DAYS RECEIPTS REFUNDED TODAY sections may have different codes like the BMA or RME so the formula has to be flexible enough to pick up the sum of these two section and place in the A RECEIPTS section.

In the same worksheet I produced a A RECEIPTS section to show what the NLC should look like (highlighted yellow).

I tried SUMIFS but that doesn't appear to be the way to go.

Thanks

2. If you're looking in only the four blocks, maybe this is what you're trying to do:

In C3, I put: =SUMPRODUCT((B3=\$B\$18:\$B\$22)*\$C\$18:\$C\$22)+SUMPRODU CT((B3=\$F\$18:\$F\$22)*\$G\$18:\$G\$22)+SUMPRODUCT((B3=\$B \$32:\$B\$39)*\$C\$32:\$C\$39)

and filled that down through C10.

Is that it?

3. If I understand correctly, sumif should work.
In C32:
=SUMIF(B\$3:B\$10,B32,C\$3:C\$10)-SUMIF(\$B\$18:\$B\$22,B32,\$C\$18:\$C\$22)-SUMIF(\$F\$18:\$F\$22,B32,\$G\$18:\$G\$22)
Copy down the column

In G32:
=SUMIF(F\$3:F\$10,F32,G\$3:G\$10)-SUMIF(\$B\$18:\$B\$22,F32,\$C\$18:\$C\$22)-SUMIF(\$F\$18:\$F\$22,F32,\$G\$18:\$G\$22)
Copy down the column

Steve

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•